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
First of all, thank you for this great package. It works really well and is much easier to get started compared to some others and has great re-activity.
The current issue that we are reporting is that oneOf only works with a very specific format of the const keyword.
In particular, what we are aiming to generate is a json that has either: option : [a], option: [b], or option: [b,c] and depending on that a different sub-schema.
Please advice us on how to get this going, i.e. the full json should like like:
{
option : [a],
sharedProperty : "abc"
}
The text was updated successfully, but these errors were encountered:
In the next major version I intend to use a closer integration with ajv and I think the current subschema of a oneOf will be calculated by attempting validation of each subschema, this way any way of discriminating between subschemas will be supported. But this will not be available soon and I don't want to make such important changes to the current version. So for the time being, sorry but a const property is the only supported way to discriminate subschemas in a oneOf.
First of all, thank you for this great package. It works really well and is much easier to get started compared to some others and has great re-activity.
The current issue that we are reporting is that
oneOf
only works with a very specific format of theconst
keyword.However, the following json-schemas do not work:
1. Nesting the Const keyword into an array
2. Using other keywords than const
e.g.: using the above schema and adding this option for
oneOf
:In particular, what we are aiming to generate is a json that has either:
option : [a]
,option: [b]
, oroption: [b,c]
and depending on that a different sub-schema.Please advice us on how to get this going, i.e. the full json should like like:
The text was updated successfully, but these errors were encountered: