'mergeSchemas' function
Merges multiple JSON schemas into a single schema with combined rules.
If able to logically merge properties from all schemas, returns a single schema object containing all merged properties.
Example: ({ a: b, max: 1 }, { c: d, max: 2 }) => { a: b, c: d, max: 1 }
If unable to logically merge, returns an allOf schema object containing an array of the original schemas;
Example: ({ a: b }, { a: d }) => { allOf: [ { a: b }, { a: d } ] }
// schemas - one or more input schemas // - merged schema
'mergeSchemas' function
Merges multiple JSON schemas into a single schema with combined rules.
If able to logically merge properties from all schemas, returns a single schema object containing all merged properties.
Example: ({ a: b, max: 1 }, { c: d, max: 2 }) => { a: b, c: d, max: 1 }
If unable to logically merge, returns an allOf schema object containing an array of the original schemas;
Example: ({ a: b }, { a: d }) => { allOf: [ { a: b }, { a: d } ] }
// schemas - one or more input schemas // - merged schema