You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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/filesbut I could alternatively submit a PR to make this the default behavior for
examples
if that would make sense to you.Feel free to decline this issue if you'd rather not change the behavior.
The text was updated successfully, but these errors were encountered: