diff options
Diffstat (limited to 'json/tests/draft2019-09/ref.json')
-rw-r--r-- | json/tests/draft2019-09/ref.json | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/json/tests/draft2019-09/ref.json b/json/tests/draft2019-09/ref.json index 4cb7bcd..fd8a3b2 100644 --- a/json/tests/draft2019-09/ref.json +++ b/json/tests/draft2019-09/ref.json @@ -539,5 +539,41 @@ "valid": true } ] + }, + { + "description": "$id must be resolved against nearest parent, not just immediate parent", + "schema": { + "$id": "http://example.com/a.json", + "$defs": { + "x": { + "$id": "http://example.com/b/c.json", + "not": { + "$defs": { + "y": { + "$id": "d.json", + "type": "number" + } + } + } + } + }, + "allOf": [ + { + "$ref": "http://example.com/b/d.json" + } + ] + }, + "tests": [ + { + "description": "number should pass", + "data": 1, + "valid": true + }, + { + "description": "non-number should fail", + "data": "a", + "valid": false + } + ] } ] |