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
What version of Ajv are you using? Does the issue happen if you use the latest version?
7.2.1
Ajv options object
const options = { ownProperties: true, };
JSON Schema
{ "type": "object", "required": [ "a" ], "properties": { "a": { "type": "string" } } }
Sample data
{}
Your code
const ajv = new Ajv(options); const foo = ajv.compile(schema); foo(data); assert.deepEqual(foo.errors[0], { keyword: 'required', dataPath: '', schemaPath: '#/required', params: { missingProperty: undefined }, message: "should have required property 'undefined'", });
What results did you expect?
missingProperty should be 'a', and message should reference it instead of undefined.
'a'
Are you going to resolve the issue?
If recommended as a good first issue.
The text was updated successfully, but these errors were encountered:
4f83021
thank you - fixed!
Sorry, something went wrong.
in 7.2.2
fix incorrect missing property reporting with ownProperties option, c…
eedb126
…loses ajv-validator#1493
No branches or pull requests
What version of Ajv are you using? Does the issue happen if you use the latest version?
7.2.1
Ajv options object
JSON Schema
Sample data
Your code
What results did you expect?
missingProperty should be
'a'
, and message should reference it instead of undefined.Are you going to resolve the issue?
If recommended as a good first issue.
The text was updated successfully, but these errors were encountered: