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
What version of Ajv are you using? Does the issue happen if you use the latest version? reproduces for me on latest version
I am seeing that for some reason when having a schema with an anyof between two objects the removeAdditionalProperties does not consider all the possible keys when removing the properties from the object and only looks at the first object in the anyOf
What results did you expect?
I expected that the remove additional properties will take all the possible object keys into consideration and not only the first one, so I am able to have a schema that allows any of the objects inside the anyof where in reality it fails for the second object
The text was updated successfully, but these errors were encountered:
Validation against any only works for objects conforming to schema a. Objects conforming to schema b will fail because while checking a, the y property gets removed.
What version of Ajv are you using? Does the issue happen if you use the latest version? reproduces for me on latest version
I am seeing that for some reason when having a schema with an anyof between two objects the removeAdditionalProperties does not consider all the possible keys when removing the properties from the object and only looks at the first object in the anyOf
jsfiddle with the issue reproduced:
https://jsfiddle.net/x7s85b3t/1/
Your code
Validation result, data AFTER validation, error messages
What results did you expect?
I expected that the remove additional properties will take all the possible object keys into consideration and not only the first one, so I am able to have a schema that allows any of the objects inside the anyof where in reality it fails for the second object
The text was updated successfully, but these errors were encountered: