karenetheridge / JSON-Schema-Modern

Validate data against a schema using a JSON Schema
https://metacpan.org/release/JSON-Schema-Modern/
Other
10 stars 1 forks source link

collect errors #3

Closed karenetheridge closed 4 years ago

karenetheridge commented 4 years ago

evaluator should return a list of errors collected while evaluating. Must include fields as defined in https://json-schema.org/draft/2019-09/json-schema-core.html#rfc.section.10.3.

See https://github.com/karenetheridge/Test-JSON-Schema-Acceptance/issues/14 for presenting these errors on unexpected validation failure.

karenetheridge commented 4 years ago

This will necessitate rewriting some keyword implementations, as with just a true/false result being expected, we had the luxury of short-circuiting the checks. Now we need to keep going and collect all relevant errors for each keyword, not just the first.

Also the overall evaluation of each subschema cannot short-circuit upon the receipt of the first false result from a keyword.

karenetheridge commented 4 years ago

This is complete as of today, to be released in version 0.001.