Skip to content

Commit

Permalink
Merge pull request #595 from json-schema-org/ether/cousins-reverse
Browse files Browse the repository at this point in the history
also test allOf schemas presented in the reverse order
  • Loading branch information
Julian authored Nov 8, 2022
2 parents 2b1f711 + b9bb50b commit 0fa89d2
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 0 deletions.
25 changes: 25 additions & 0 deletions tests/draft-next/unevaluatedProperties.json
Original file line number Diff line number Diff line change
Expand Up @@ -740,6 +740,31 @@
}
]
},
{
"description": "unevaluatedProperties can't see inside cousins (reverse order)",
"schema": {
"$schema": "https://json-schema.org/draft/next/schema",
"allOf": [
{
"unevaluatedProperties": false
},
{
"properties": {
"foo": true
}
}
]
},
"tests": [
{
"description": "always fails",
"data": {
"foo": 1
},
"valid": false
}
]
},
{
"description": "nested unevaluatedProperties, outer false, inner true, properties outside",
"schema": {
Expand Down
25 changes: 25 additions & 0 deletions tests/draft2019-09/unevaluatedProperties.json
Original file line number Diff line number Diff line change
Expand Up @@ -740,6 +740,31 @@
}
]
},
{
"description": "unevaluatedProperties can't see inside cousins (reverse order)",
"schema": {
"$schema": "https://json-schema.org/draft/2019-09/schema",
"allOf": [
{
"unevaluatedProperties": false
},
{
"properties": {
"foo": true
}
}
]
},
"tests": [
{
"description": "always fails",
"data": {
"foo": 1
},
"valid": false
}
]
},
{
"description": "nested unevaluatedProperties, outer false, inner true, properties outside",
"schema": {
Expand Down
25 changes: 25 additions & 0 deletions tests/draft2020-12/unevaluatedProperties.json
Original file line number Diff line number Diff line change
Expand Up @@ -740,6 +740,31 @@
}
]
},
{
"description": "unevaluatedProperties can't see inside cousins (reverse order)",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"allOf": [
{
"unevaluatedProperties": false
},
{
"properties": {
"foo": true
}
}
]
},
"tests": [
{
"description": "always fails",
"data": {
"foo": 1
},
"valid": false
}
]
},
{
"description": "nested unevaluatedProperties, outer false, inner true, properties outside",
"schema": {
Expand Down

0 comments on commit 0fa89d2

Please sign in to comment.