-
-
Notifications
You must be signed in to change notification settings - Fork 68
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
spurious error "must NOT have additional properties" for required field #235
Comments
Your schema should be:
|
Hi @shoops I'm not sure to understand the reason, however: according to the 2020-12 draft
I may have misunderstood the paragraph, but to me this means that
|
Yes, that is correct but the problem is that the "additinalProperties": false is evaluated without any properties being defined. I have seen this behavior with all schema validators I tried. You can use "additionalProperties": "[or]" which would allow only properties o and r. |
I am encountering an unexpected behavior from
ajv-cli
.with the following
sch.json
and the following
dat.json
but the field
r
is required, and must be set.The text was updated successfully, but these errors were encountered: