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
The problem is that the second schema you have defined does not prevent additionalProperties, nor does it "require" a property of relative. Therefore it passes as true for the second schema in the oneOf. If you want this to fail either make additionalProperties false or add required.
These are common mistakes when working with JSON Schema.
What version of Ajv are you using? Does the issue happen if you use the latest version?
ajv: "8.12.0"
Ajv options object
JSON Schema
Sample data
Your code
Validation result, data AFTER validation, error messages
true
What results did you expect?
false
The text was updated successfully, but these errors were encountered: