Hiya, I'm not sure if this should be in json-schema-merge-allof or just left up to me to write a custom resolver.
When merging JSONSchemas, I think we can assume that any examples of each of the to-be-merged schemas should also be merged. Since JSONSchema examples is an array, we need to merge each corresponding examples array element in each of the to-be-merged schemas. When encountering arrays, the default behavior seems to be to concatenate them, but examples should have each element merged.
Hiya, I'm not sure if this should be in json-schema-merge-allof or just left up to me to write a custom resolver.
When merging JSONSchemas, I think we can assume that any
examples
of each of the to-be-merged schemas should also be merged. Since JSONSchemaexamples
is an array, we need to merge each corresponding examples array element in each of the to-be-merged schemas. When encountering arrays, the default behavior seems to be to concatenate them, but examples should have each element merged.I wrote a custom resolver for
examples
here: https://github.com/wikimedia/jsonschema-tools/pull/14/files but I could alternatively submit a PR to make this the default behavior forexamples
if that would make sense to you.Feel free to decline this issue if you'd rather not change the behavior.