diff options
Diffstat (limited to 'json/tests/draft-next/id.json')
-rw-r--r-- | json/tests/draft-next/id.json | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/json/tests/draft-next/id.json b/json/tests/draft-next/id.json index c5eab10..db7afaf 100644 --- a/json/tests/draft-next/id.json +++ b/json/tests/draft-next/id.json @@ -254,5 +254,36 @@ "valid": false } ] + }, + { + "description": "non-schema object containing an $id property", + "schema": { + "$defs": { + "const_not_id": { + "const": { + "$id": "not_a_real_id" + } + } + }, + "if": { + "const": "skip not_a_real_id" + }, + "then": true, + "else" : { + "$ref": "#/$defs/const_not_id" + } + }, + "tests": [ + { + "description": "skip traversing definition for a valid result", + "data": "skip not_a_real_id", + "valid": true + }, + { + "description": "const at const_not_id does not match", + "data": 1, + "valid": false + } + ] } ] |