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
This is subtle, e.g. with anyOf it is possible that the data matches several subschemas each with different default values. Do we apply (a) the first default, (b) the defaults in turn (ordering of map is not necessarily the same as the original schema data file), (c) the first default providing there are no other schemas providing defaults, (d) no defaults (unless there is a single matching subschema).
Similar issue for allOf, do we apply the defaults of each subschema in turn, overriding where necessary?
For oneOf, we must check that the data matches a unique subschema, if it matches more than one then we cannot reliably determine which default (from which subschema) to apply.
not is easy, since the data must never match any of the subschemas we know never to apply any of these defaults.
This is subtle, e.g. with
anyOf
it is possible that the data matches several subschemas each with different default values. Do we apply (a) the first default, (b) the defaults in turn (ordering of map is not necessarily the same as the original schema data file), (c) the first default providing there are no other schemas providing defaults, (d) no defaults (unless there is a single matching subschema).Similar issue for
allOf
, do we apply the defaults of each subschema in turn, overriding where necessary?For
oneOf
, we must check that the data matches a unique subschema, if it matches more than one then we cannot reliably determine which default (from which subschema) to apply.not
is easy, since the data must never match any of the subschemas we know never to apply any of these defaults.e.g.
https://spacetelescope.github.io/understanding-json-schema/reference/combining.html
The text was updated successfully, but these errors were encountered: