-
Notifications
You must be signed in to change notification settings - Fork 12
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
False positive requireValidation
check with minProperties
#149
Comments
The purpose of that check is to ensure that the schema author does not forget to specify {
"type": "object",
"properties": {
"x": { "type": "number" },
"y": { "type": "number" }
}
} If the intent is to not have any properties required, explicitly stating |
In the I wonder if this could introduce schema errors though vs the benefits of not writing I'll look closer into that. |
Personally I can't think of any situations where The workaround of |
Description
This schema will fail with
[requireValidation] if properties is used, required should be specified
.The requirement in this case is not necessary because
minProperties
is specified andadditionalProperties
is set to false, so at least one ofphoneNumber
andemailAddress
is already required without explicitly using therequired
keyword.Related code
schemasafe/src/compile.js
Line 1158 in 81459f3
The text was updated successfully, but these errors were encountered: