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
In #3472, we state that to conform to the specification, the jsonschema logic should not
treat default values as part of the generated schema. But it would still be useful to
be able to make use of those default values.
Straw man feature: we could have the option to generate a "template value" for
a given JSON Schema that does define regular fields and default values.
Note that this is not a trivial thing to do, as defaults and regular fields do not
mix nicely with the validator-only nature of matchN, as generated by oneOf, allOf and anyOf.
but that won't fill in defaults at all, because matchN is a pure validator. But I don't think we know how to combine templates and oneOf etc semantics right now.
The text was updated successfully, but these errors were encountered:
In #3472, we state that to conform to the specification, the jsonschema logic should not
treat default values as part of the generated schema. But it would still be useful to
be able to make use of those default values.
Straw man feature: we could have the option to generate a "template value" for
a given JSON Schema that does define regular fields and default values.
Note that this is not a trivial thing to do, as defaults and regular fields do not
mix nicely with the validator-only nature of
matchN
, as generated byoneOf
,allOf
andanyOf
.For example:
The natural encoding for this might be:
but that won't fill in defaults at all, because
matchN
is a pure validator. But I don't think we know how to combine templates andoneOf
etc semantics right now.The text was updated successfully, but these errors were encountered: