-
-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
if/then/else + default #40
Comments
"default" is ignored inside oneOf - see https://github.com/epoberezkin/ajv#assigning-defaults You can safely use "allOf" - then defaults inside "then" will be applied. |
You can't use allOf as is, but you can restructure the schemas so you don't have else's and then use allOf. |
I don't get it. You don't mean this, do you?
|
Can you please try putting defaults directly in |
Both examples give the same result as before when I resolve the definitions. Here's the second (the one with
|
I'm facing the same issue. |
This is a similar schema as in json-schema-org/json-schema-spec#180 (comment):
This time I try to have Ajv coerce the data into a valid structure, but I get errors:
The text was updated successfully, but these errors were encountered: