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 yields an error that there are "Duplicate discriminator values: cat", which makes sense, as there are now two elements that match the "animal" tag. Not passing a discriminator will yield a (fairly flat) JSON Schema, but I like using the if-else statements for better error messages and more readability of the schema.
I'd expect something like the following to be possible to generate, by extending the current logic:
I would, in this case, add some recursive logic that also applies the if-then constants to the leafs so that they can disable additional properties for better type checking.
The text was updated successfully, but these errors were encountered:
Take, for example, a collection of pets:
This yields an error that there are "Duplicate discriminator values: cat", which makes sense, as there are now two elements that match the "animal" tag. Not passing a discriminator will yield a (fairly flat) JSON Schema, but I like using the if-else statements for better error messages and more readability of the schema.
I'd expect something like the following to be possible to generate, by extending the current logic:
I would, in this case, add some recursive logic that also applies the if-then constants to the leafs so that they can disable additional properties for better type checking.
The text was updated successfully, but these errors were encountered: