Debian Codegraph @

share/tests/v1/optional/refOfUnknownKeyword.json

raw
1 [
2 {
3 "description": "reference of a root arbitrary keyword ",
4 "schema": {
5 "$schema": "https://json-schema.org/v1",
6 "unknown-keyword": {"type": "integer"},
7 "properties": {
8 "bar": {"$ref": "#/unknown-keyword"}
9 }
10 },
11 "tests": [
12 {
13 "description": "match",
14 "data": {"bar": 3},
15 "valid": true
16 },
17 {
18 "description": "mismatch",
19 "data": {"bar": true},
20 "valid": false
21 }
22 ]
23 },
24 {
25 "description": "reference of a root arbitrary keyword with encoded ref",
26 "schema": {
27 "$schema": "https://json-schema.org/v1",
28 "unknown/keyword": {"type": "integer"},
29 "properties": {
30 "bar": {"$ref": "#/unknown~1keyword"}
31 }
32 },
33 "tests": [
34 {
35 "description": "match",
36 "data": {"bar": 3},
37 "valid": true
38 },
39 {
40 "description": "mismatch",
41 "data": {"bar": true},
42 "valid": false
43 }
44 ]
45 },
46 {
47 "description": "reference of an arbitrary keyword of a sub-schema",
48 "schema": {
49 "$schema": "https://json-schema.org/v1",
50 "properties": {
51 "foo": {"unknown-keyword": {"type": "integer"}},
52 "bar": {"$ref": "#/properties/foo/unknown-keyword"}
53 }
54 },
55 "tests": [
56 {
57 "description": "match",
58 "data": {"bar": 3},
59 "valid": true
60 },
61 {
62 "description": "mismatch",
63 "data": {"bar": true},
64 "valid": false
65 }
66 ]
67 },
68 {
69 "description": "reference internals of known non-applicator",
70 "schema": {
71 "$schema": "https://json-schema.org/v1",
72 "examples": [
73 { "type": "string" }
74 ],
75 "$ref": "#/examples/0"
76 },
77 "tests": [
78 {
79 "description": "match",
80 "data": "a string",
81 "valid": true
82 },
83 {
84 "description": "mismatch",
85 "data": 42,
86 "valid": false
87 }
88 ]
89 },
90 {
91 "description": "reference of an arbitrary keyword of a sub-schema with encoded ref",
92 "schema": {
93 "$schema": "https://json-schema.org/v1",
94 "properties": {
95 "foo": {"unknown/keyword": {"type": "integer"}},
96 "bar": {"$ref": "#/properties/foo/unknown~1keyword"}
97 }
98 },
99 "tests": [
100 {
101 "description": "match",
102 "data": {"bar": 3},
103 "valid": true
104 },
105 {
106 "description": "mismatch",
107 "data": {"bar": true},
108 "valid": false
109 }
110 ]
111 }
112 ]