github.com/kaptinlin/jsonschema@v0.4.6/testdata/JSON-Schema-Test-Suite/tests/draft2020-12/optional/unknownKeyword.json (about) 1 [ 2 { 3 "description": "$id inside an unknown keyword is not a real identifier", 4 "comment": "the implementation must not be confused by an $id in locations we do not know how to parse", 5 "schema": { 6 "$schema": "https://json-schema.org/draft/2020-12/schema", 7 "$defs": { 8 "id_in_unknown0": { 9 "not": { 10 "array_of_schemas": [ 11 { 12 "$id": "https://localhost:1234/draft2020-12/unknownKeyword/my_identifier.json", 13 "type": "null" 14 } 15 ] 16 } 17 }, 18 "real_id_in_schema": { 19 "$id": "https://localhost:1234/draft2020-12/unknownKeyword/my_identifier.json", 20 "type": "string" 21 }, 22 "id_in_unknown1": { 23 "not": { 24 "object_of_schemas": { 25 "foo": { 26 "$id": "https://localhost:1234/draft2020-12/unknownKeyword/my_identifier.json", 27 "type": "integer" 28 } 29 } 30 } 31 } 32 }, 33 "anyOf": [ 34 { "$ref": "#/$defs/id_in_unknown0" }, 35 { "$ref": "#/$defs/id_in_unknown1" }, 36 { "$ref": "https://localhost:1234/draft2020-12/unknownKeyword/my_identifier.json" } 37 ] 38 }, 39 "tests": [ 40 { 41 "description": "type matches second anyOf, which has a real schema in it", 42 "data": "a string", 43 "valid": true 44 }, 45 { 46 "description": "type matches non-schema in first anyOf", 47 "data": null, 48 "valid": false 49 }, 50 { 51 "description": "type matches non-schema in third anyOf", 52 "data": 1, 53 "valid": false 54 } 55 ] 56 } 57 ]