Merge multiple JSON Schema objects from allOf into one.
Merges: properties, required, meta fields, and constraints.
Semantics are first-write-wins for meta and constraint keywords.
When a later branch redefines a keyword with a non-equal value the
later value is silently dropped — an allof-conflict diagnostic is
emitted so the loss is visible to consumers.
Boolean branches (valid per Draft 06+) collapse the composite:
false makes the entire allOf unsatisfiable — return false,
which the walker turns into a NeverField.
true is the always-valid schema and contributes no constraints —
skip silently.
Type compatibility is enforced rather than papered over: two
branches asserting incompatible primitive type keywords
(e.g. string ∩ number) describe an unsatisfiable conjunction.
mergeAllOf returns false and emits
schema-allof-incompatible so the walker produces the same
NeverField shape it gives a top-level false schema. Pretending
the first type wins silently would silently weaken the constraint
for any consumer that reads the merged result.
Non-boolean, non-object entries (e.g. arrays, numbers) are malformed
inputs that cannot represent a schema; skip them as before.
Merge multiple JSON Schema objects from allOf into one. Merges: properties, required, meta fields, and constraints.
Semantics are first-write-wins for meta and constraint keywords. When a later branch redefines a keyword with a non-equal value the later value is silently dropped — an
allof-conflictdiagnostic is emitted so the loss is visible to consumers.Boolean branches (valid per Draft 06+) collapse the composite:
falsemakes the entireallOfunsatisfiable — returnfalse, which the walker turns into aNeverField.trueis the always-valid schema and contributes no constraints — skip silently.Type compatibility is enforced rather than papered over: two branches asserting incompatible primitive
typekeywords (e.g.string∩number) describe an unsatisfiable conjunction.mergeAllOfreturnsfalseand emitsschema-allof-incompatibleso the walker produces the sameNeverFieldshape it gives a top-levelfalseschema. Pretending the first type wins silently would silently weaken the constraint for any consumer that reads the merged result.Non-boolean, non-object entries (e.g. arrays, numbers) are malformed inputs that cannot represent a schema; skip them as before.