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?
Ajv Version:8.12.0 Ajv options object
const ajv = new Ajv({useDefaults: true, strict: false})
Validation result, data AFTER validation, error messages
{"foo":6,"bar":{"abc":"abc-outer","efg":88},"prop1":[[5]]}-- Output for first test case
{"foo":6,"yyy":[{"xyz":"testValue","ssms":[5,null,"abcdef"]}],"bar":{"abc":"abc-outer"},"prop1":[]}--output for second test case
What results did you expect?
{"foo":6,"bar":{"abc":"abc-outer","efg":88},"prop1":[[5]]}-- Output for first test case is fine and works as expected
{"foo":6,"yyy":[{"xyz":"testValue","ssms":[5,null,"abcdef"]}],"bar":{"abc":"abc-outer","efg":88},"prop1":[[5]]} -- This is what i expected for second test case.
The output for first test case is as expected but the output for second test case is not expected. I was expecting
{"foo":6,"yyy":[{"xyz":"testValue","ssms":[5,null,"abcdef"]}],"bar":{"abc":"abc-outer","efg":88},"prop1":[[5]]}
why does the output for "bar" and "prop1" change when an empty array is provided for a different field (yyy) Are you going to resolve the issue?
The text was updated successfully, but these errors were encountered:
What version of Ajv are you using? Does the issue happen if you use the latest version?
Ajv Version:8.12.0
Ajv options object
const ajv = new Ajv({useDefaults: true, strict: false})
JSON Schema
Sample data
Your code
Validation result, data AFTER validation, error messages
What results did you expect?
{"foo":6,"bar":{"abc":"abc-outer","efg":88},"prop1":[[5]]}-- Output for first test case is fine and works as expected
{"foo":6,"yyy":[{"xyz":"testValue","ssms":[5,null,"abcdef"]}],"bar":{"abc":"abc-outer","efg":88},"prop1":[[5]]} -- This is what i expected for second test case.
The output for first test case is as expected but the output for second test case is not expected. I was expecting
{"foo":6,"yyy":[{"xyz":"testValue","ssms":[5,null,"abcdef"]}],"bar":{"abc":"abc-outer","efg":88},"prop1":[[5]]}
why does the output for "bar" and "prop1" change when an empty array is provided for a different field (yyy)
Are you going to resolve the issue?
The text was updated successfully, but these errors were encountered: