-
-
Notifications
You must be signed in to change notification settings - Fork 877
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
strictKeywords true causes array items false schema to incorrectly validate non-empty array #1270
Comments
@mfulton26 thanks for the report - reproduced here: https://runkit.com/esp/5f51452a3e8d0f001abfa741. I am wondering - are you using |
They were, but we discussed the correct way to determine that on the mentioned issue which is now closed from the JSON Schema github =] |
Yes, exactly. I know there are other ways and honestly using maxItems has grown on my as it gives an error message that fits my use case better but I was surprised that using strictKeywords was what caused the unexpected change in validation |
It's the bug that has to be fixed for sure - thanks for reporting. |
it was actually fixed in 7402f98, about to publish |
What version of Ajv are you using? Does the issue happen if you use the latest version?
6.12.4 (latest)
Ajv options object
JSON Schema
Sample data
[1]
Your code
Validation result, data AFTER validation, error messages
What results did you expect?
same validation error as when
strictKeywords
isfalse
or"log"
Are you going to resolve the issue?
Am I going to submit a PR? Not planning on it. Am I good with closing the issue after feedback? Yes.
The text was updated successfully, but these errors were encountered: