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
If a $ref to a definition contains another, nested $ref, schemaPath seems to refer to the root of current schema instead of the document as a whole. There's no way to then get the full schema path to the error, which is what I need.
I expected the schemaPath to be like #/properties/shipping_address/allOf/0/required, instead it points erroneously to #/required. This problem only occurs with nested $refs, which my full schema happens to have a lot of.
Are you going to resolve the issue?
I can have a quick look if this is an easy fix, but it would be a lot easier for someone with some understanding of the inner workings of the ajv reference and id resolver to come up with a suitable fix.
The text was updated successfully, but these errors were encountered:
This is about ajv 6.0.0, any options.
If a
$ref
to a definition contains another, nested$ref
, schemaPath seems to refer to the root of current schema instead of the document as a whole. There's no way to then get the full schema path to the error, which is what I need.JSON Schema
Sample data
Your code
(using
ajv-cli
for this test)Validation result, data AFTER validation, error messages
What results did you expect?
I expected the schemaPath to be like
#/properties/shipping_address/allOf/0/required
, instead it points erroneously to#/required
. This problem only occurs with nested$ref
s, which my full schema happens to have a lot of.Are you going to resolve the issue?
I can have a quick look if this is an easy fix, but it would be a lot easier for someone with some understanding of the inner workings of the ajv reference and id resolver to come up with a suitable fix.
The text was updated successfully, but these errors were encountered: