Skip to content

Commit ccd02a1

Browse files
committed
[244] Add $vocabulary tests that test presence in subschemas
1 parent 827d2fc commit ccd02a1

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed

tests/draft2019-09/meta/core.json

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,63 @@
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
195252
}
196253
]
197254
},

0 commit comments

Comments
 (0)