Debian Codegraph @

t/additional-tests-draft2020-12/id.json

raw
1 [
2 {
3 "description": "non-schema object containing an $id property",
4 "schema": {
5 "$defs": {
6 "const_not_id": {
7 "const": {
8 "$id": "not_a_real_id"
9 }
10 }
11 },
12 "if": {
13 "const": "skip not_a_real_id"
14 },
15 "then": true,
16 "else" : {
17 "$ref": "#/$defs/const_not_id"
18 }
19 },
20 "tests": [
21 {
22 "description": "skip traversing definition for a valid result",
23 "data": "skip not_a_real_id",
24 "valid": true
25 },
26 {
27 "description": "const at const_not_id does not match",
28 "data": 1,
29 "valid": false
30 }
31 ]
32 },
33 {
34 "description": "'' not permitted as $id",
35 "schema": {
36 "$id": "",
37 "type": "string"
38 },
39 "tests": [
40 {
41 "description": "schema would pass without $id",
42 "data": "foo",
43 "valid": false
44 },
45 {
46 "description": "schema would fail even without $id",
47 "data": 1,
48 "valid": false
49 }
50 ]
51 },
52 {
53 "description": "'#' not permitted as $id",
54 "schema": {
55 "$id": "#",
56 "type": "string"
57 },
58 "tests": [
59 {
60 "description": "schema would pass without $id",
61 "data": "foo",
62 "valid": false
63 },
64 {
65 "description": "schema would fail even without $id",
66 "data": 1,
67 "valid": false
68 }
69 ]
70 }
71 ]