Skip to content
New issue

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

A new test case ignores no-objects added in official test suites failed in this validator #7

Closed
stevehu opened this issue Oct 21, 2016 · 2 comments

Comments

@stevehu
Copy link
Contributor

stevehu commented Oct 21, 2016

This is a brand new test case added in the official test suites and it failed as I am not ignoring non-objects. If foo object is required and you just pass in a number, I just don't understand why this can be valid. Need sometime to investigate why this is true before implement it.
[
{
"description": "required validation",
"schema": {
"properties": {
"foo": {},
"bar": {}
},
"required": ["foo"]
},
"tests": [
{
"description": "ignores non-objects",
"data": 12,
"valid": true
}
]
}
]

@Relequestual
Copy link

Applicability rules apply here.
requires is only applied to objects. If the instance is not an object, that keyword is not applicable.

@fdutton
Copy link
Contributor

fdutton commented May 22, 2023

This issue appears to have been fixed sometime in the past. The test-case passes.

@fdutton fdutton closed this as completed May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants