We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JSON Schema (please make it as small as possible to reproduce the issue):
{ "properties": { "a": { "$ref": "int" } } }
int:
{ "id": "int", "type": "integer" }
Data (please make it as small as posssible to reproduce the issue):
{ "a": "foo" }
Your code (please use options, schema and data as variables):
options
schema
data
ajv.addSchema({ "id": "int", "type": "integer" }); var validate = ajv.compile({ "properties": { "a": { "$ref": "int" } } }); validate(data);
See code
Validation result, data AFTER validation, error messages:
Result: false
errors:
[{ "keyword":"type", "dataPath":".a", "schemaPath":"int/type", "params":{"type":"integer"}, "message":"should be integer"} ]
What results did you expect?
schemaPath should be "int#/type" (if parent schema has {$ref:'int#'} it will be as it should).
The text was updated successfully, but these errors were encountered:
test: failing test for #273, incorrect schemaPath in referenced schema
a9e77e2
schemaPath
ajv.errors
$ref
No branches or pull requests
JSON Schema (please make it as small as possible to reproduce the issue):
int:
Data (please make it as small as posssible to reproduce the issue):
Your code (please use
options
,schema
anddata
as variables):See code
Validation result, data AFTER validation, error messages:
Result: false
errors:
What results did you expect?
schemaPath should be "int#/type" (if parent schema has {$ref:'int#'} it will be as it should).
The text was updated successfully, but these errors were encountered: