-
-
Notifications
You must be signed in to change notification settings - Fork 215
dependentSchemas
and propertyDependencies
don't "define" properties
#626
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
Labels
enhancement
An enhancement to the tooling or structure of the suite (as opposed to a new test).
missing test
A request to add a test to the suite that is currently not covered elsewhere.
Comments
@gregsdennis Can you please check if this test matches the requirements for this issue? [
{
"description": "dependent schema with additionalProperties",
"schema": {
"$schema": "https://json-schema.org/draft/2019-09/schema",
"dependentSchemas": {
"foo": {}
},
"additionalProperties": false
},
"tests": [
{
"description": "dependentSchemas properties are counted as additional properties",
"data": {
"foo": ""
},
"valid": false
}
]
},
{
"description": "dependent schema with unevaluatedProperties",
"schema": {
"$schema": "https://json-schema.org/draft/2019-09/schema",
"dependentSchemas": {
"foo": {}
},
"unevaluatedProperties": false
},
"tests": [
{
"description": "dependentSchemas properties are counted as unevaluated properties",
"data": {
"foo": ""
},
"valid": false
}
]
}
]
|
Yeah, those should do. We'll need similar tests for the new |
[{
"description" : "propertyDependencies with additionalProperties",
"schema" : {
"propertyDependencies" : {
"foo" : {}
},
"additionalProperties" : false
},
"tests" : [
{
"description": "propertyDependencies properties are count as additionalproperties" ,
"data" : {"foo" : ""},
"valid" : false
}
]
},
{
"description" : "propertyDependencies with unevaluatedProperties" ,
"schema" : {
"propertyDependencies" : {
"foo" : {}
},
"unevaluatedProperties" : false
},
"test" : [
{
"description": "propertyDependencies properties are count as the unevaluatedProperties" ,
"data": {"foo": ""},
"valid": false
}
]
}] |
Is this test also require for dependentSchemas in draft/next or this behaviour is going to be change in next ? |
@gregsdennis i think this one need to be close as it done in #732 |
Yes. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
enhancement
An enhancement to the tooling or structure of the suite (as opposed to a new test).
missing test
A request to add a test to the suite that is currently not covered elsewhere.
Coming out of a Slack discussion and #624, we need tests that show that properties listed in
dependentSchemas
andpropertyDependencies
don't affect the validation results ofadditionalProperties
orunevaluatedProperties
.The text was updated successfully, but these errors were encountered: