ajv-errors
ajv-errors copied to clipboard
Remove certain errors
Probably using null as the value of errorMessage
Can you give an estimate for the cost of fixing this, or suggest a better JSON validator for use? Email [email protected]. I am getting 209 errors in Ajv. I have a feeling there's only 1 or 2 real errors in the whole bunch. Your approach is WRONG, and higher level errors in the JSON hierarchy (closer to the trunk) should not be reported when there's a lower level error in the hierarchy (farther away from the trunk) that causes the higher level error. The JSON in question has deeply nested repeated structures, so I don't think your approach above will work. I can't suppress error messages at any level. The error messages should not be generated.
To give you an idea of the scope of the problem, I have 41 files to validate, with 2721 keyword errors. So around 65 errors per file. These are files that DO validate with our other schema. We're trying to design an automatically generated schema. However, we have been changing the standard, and we need to catch files out of compliance. There are some important differences, and we added oneOf's to catch files out of compliance, but they aren't in our old schema yet. We would like to move to the new schema.
Your approach will work if it reports errors, but prevents bubbling.
If I could put bubble: false in options that would be great!
Removing the allErrors and verbose options reduced the number of errors 75%. I may be able to deal with that.