Skip to content

Commit 90f545d

Browse files
committed
Add test case for explicit use of 2020 metaschema
Relative dyanicRef usage was resolved incorrectly in the prior implementation, but it has been fixed by correct use of `referencing`. Test to ensure that this case is satisfied. See also: #293
1 parent 9481d2a commit 90f545d

File tree

2 files changed

+81
-0
lines changed

2 files changed

+81
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"$id": "https://json-schema.org/draft/2020-12/schema",
4+
"$vocabulary": {
5+
"https://json-schema.org/draft/2020-12/vocab/core": true,
6+
"https://json-schema.org/draft/2020-12/vocab/applicator": true,
7+
"https://json-schema.org/draft/2020-12/vocab/unevaluated": true,
8+
"https://json-schema.org/draft/2020-12/vocab/validation": true,
9+
"https://json-schema.org/draft/2020-12/vocab/meta-data": true,
10+
"https://json-schema.org/draft/2020-12/vocab/format-annotation": true,
11+
"https://json-schema.org/draft/2020-12/vocab/content": true
12+
},
13+
"$dynamicAnchor": "meta",
14+
"title": "Core and Validation specifications meta-schema",
15+
"allOf": [
16+
{
17+
"$ref": "meta/core"
18+
},
19+
{
20+
"$ref": "meta/applicator"
21+
},
22+
{
23+
"$ref": "meta/unevaluated"
24+
},
25+
{
26+
"$ref": "meta/validation"
27+
},
28+
{
29+
"$ref": "meta/meta-data"
30+
},
31+
{
32+
"$ref": "meta/format-annotation"
33+
},
34+
{
35+
"$ref": "meta/content"
36+
}
37+
],
38+
"type": [
39+
"object",
40+
"boolean"
41+
],
42+
"$comment": "This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",
43+
"properties": {
44+
"definitions": {
45+
"$comment": "\"definitions\" has been replaced by \"$defs\".",
46+
"type": "object",
47+
"additionalProperties": {
48+
"$dynamicRef": "#meta"
49+
},
50+
"deprecated": true,
51+
"default": {}
52+
},
53+
"dependencies": {
54+
"$comment": "\"dependencies\" has been split and replaced by \"dependentSchemas\" and \"dependentRequired\" in order to serve their differing semantics.",
55+
"type": "object",
56+
"additionalProperties": {
57+
"anyOf": [
58+
{
59+
"$dynamicRef": "#meta"
60+
},
61+
{
62+
"$ref": "meta/validation#/$defs/stringArray"
63+
}
64+
]
65+
},
66+
"deprecated": true,
67+
"default": {}
68+
},
69+
"$recursiveAnchor": {
70+
"$comment": "\"$recursiveAnchor\" has been replaced by \"$dynamicAnchor\".",
71+
"$ref": "meta/core#/$defs/anchorString",
72+
"deprecated": true
73+
},
74+
"$recursiveRef": {
75+
"$comment": "\"$recursiveRef\" has been replaced by \"$dynamicRef\".",
76+
"$ref": "meta/core#/$defs/uriReferenceString",
77+
"deprecated": true
78+
}
79+
}
80+
}

0 commit comments

Comments
 (0)