-
-
Notifications
You must be signed in to change notification settings - Fork 887
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
json-schema-secure.json fails strict type validation in v7 #1373
Comments
Thank you! This schema needs to be updated to be compatible with the strict mode. For now - you need to disable strict mode (with |
or maybe even |
Actually, this schema should be used with Also, for draft-2019-09 a more concise version of this schema can be created using recursive references, that would also validate schema against draft-2019-09 meta-schema. |
Thanks for the clarification @epoberezkin |
Hello @epoberezkin , is there a page or source where I could take a look at how to update "an old schema" to the new way of doing things (strict mode)? I did not update my project for a while and now I have update ajv I am getting a ton of errors like the one reported here. Thank you in advance and regards |
What version of Ajv are you using? Does the issue happen if you use the latest version?
v7.0.2
JSON Schema
The schema in
/lib/refs/json-schema-secure.json
fails strict type validation in v7 and return the following errors when running a security check as documented at https://github.com/ajv-validator/ajv/blob/master/docs/security.md#security-risks-of-trusted-schemas:This can be worked around by using
strictTypes: false
.The text was updated successfully, but these errors were encountered: