Skip to content

Commit b269231

Browse files
committed
[244] Add $vocabulary tests: presence in subschemas, non-normalized URIs
1 parent 827d2fc commit b269231

File tree

1 file changed

+66
-0
lines changed

1 file changed

+66
-0
lines changed

tests/draft2019-09/meta/core.json

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,72 @@
192192
}
193193
},
194194
"valid": false
195+
},
196+
{
197+
"description": "$vocabulary in subschema with no canonical ID: in allOf",
198+
"data": {
199+
"allOf": [
200+
{
201+
"$vocabulary": {
202+
"https://json-schema.org/draft/2019-09/vocab/core": true
203+
}
204+
}
205+
]
206+
},
207+
"valid": false
208+
},
209+
{
210+
"description": "$vocabulary in subschema with no canonical ID: in referenced",
211+
"data": {
212+
"$ref": "#/$defs/A",
213+
"$defs": {
214+
"A": {
215+
"$vocabulary": {
216+
"https://json-schema.org/draft/2019-09/vocab/core": true
217+
}
218+
}
219+
}
220+
},
221+
"valid": false
222+
},
223+
{
224+
"description": "$vocabulary in subschema with canonical ID: has $id",
225+
"data": {
226+
"$ref": "#/$defs/A",
227+
"$defs": {
228+
"A": {
229+
"$id": "other",
230+
"$vocabulary": {
231+
"https://json-schema.org/draft/2019-09/vocab/core": true
232+
}
233+
}
234+
}
235+
},
236+
"valid": false
237+
},
238+
{
239+
"description": "$vocabulary in subschema with canonical ID: has $anchor",
240+
"data": {
241+
"$ref": "#/$defs/A",
242+
"$defs": {
243+
"A": {
244+
"$anchor": "name",
245+
"$vocabulary": {
246+
"https://json-schema.org/draft/2019-09/vocab/core": true
247+
}
248+
}
249+
}
250+
},
251+
"valid": false
252+
},
253+
{
254+
"description": "non-normalized $vocabulary: path segment",
255+
"data": {
256+
"$vocabulary": {
257+
"https://json-schema.org/./draft/2019-09/vocab/core": true
258+
}
259+
},
260+
"valid": false
195261
}
196262
]
197263
},

0 commit comments

Comments
 (0)