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
Validation result, data AFTER validation, error messages
{
"instancePath": "",
"schemaPath": "#/unevaluatedProperties",
"keyword": "unevaluatedProperties",
"params": {
"unevaluatedProperty": "name"
},
"message": "must NOT have unevaluated properties"
}
What results did you expect?
If I understand the JSON Schema specification around unevaluatedProperties and sub-schemas applied conditionally, the validation should pass with no errors given that name is defined in properties adjacent to unevaluatedProperties and it is present in the data instance.
After looking at this issue for a while now I have to agree it does look like a bug. I have created this runkit example for convenience.
It does seem that dependantSchema is interfering with name being considered an evaluated property because if I (a) remove dependentSchemas or (b) use another keyword like allOf to do any other processing this passes.
I will try and look into the dependentSchemas keyword to see if I can understand what's happening.
Code sandbox: https://codesandbox.io/s/ajv-playground-forked-nz924l?file=/src/index.js
What version of Ajv are you using? Does the issue happen if you use the latest version?
Latest 8.17.1
Ajv options object
Empty (no options)
JSON Schema
Sample data
Your code
Validation result, data AFTER validation, error messages
What results did you expect?
If I understand the JSON Schema specification around
unevaluatedProperties
and sub-schemas applied conditionally, the validation should pass with no errors given thatname
is defined inproperties
adjacent tounevaluatedProperties
and it is present in the data instance.Interestingly, the same example passes validation in https://www.jsonschemavalidator.net
Are you going to resolve the issue?
Looking for clarification/analysis from maintainers or those who are well-versed in latest JSON Schema specifications.
The text was updated successfully, but these errors were encountered: