add tests for unevaluatedProperties seeing inside propertyDependencies
"valid": true
}
]
+ },
+ {
+ "description": "unevaluatedProperties can see inside propertyDependencies",
+ "schema": {
+ "$schema": "https://json-schema.org/draft/next/schema",
+ "propertyDependencies": {
+ "foo": {
+ "foo1": {
+ "properties": {
+ "bar": true
+ }
+ }
+ }
+ },
+ "unevaluatedProperties": false
+ },
+ "tests": [
+ {
+ "description": "allows bar if foo = foo1",
+ "data": {
+ "foo": "foo1",
+ "bar": 42
+ },
+ "valid": true
+ },
+ {
+ "description": "disallows bar if foo != foo1",
+ "data": {
+ "foo": "foo2",
+ "bar": 42
+ },
+ "valid": false
+ },
+ {
+ "description": "disallows bar if foo is absent",
+ "data": {
+ "bar": 42
+ },
+ "valid": false
+ }
+ ]
}
]
