xeipuuv/gojsonschema

Insufficient depth in error reporting

cheeryfella opened this issue · 0 comments

I have a schema using some conditionals which can be viewed here

when validating. the schema against the payload as described in that link you can see the errors reported drill down, so they include the failure to satisfy the 'oneOf', the failure to satisfy a 'then' and a failure to fulfil the requirements of properties for the 'replace' schema.

When running this in code I receive only the following:

"data.attributes: Must validate one and only one schema (oneOf)"

This doesn't really provide sufficient information about the validation failure to the end user and I'm struggling to to see how to give more context.