Skip to content

Commit 46ae014

Browse files
committed
Update meta-schemas for $dynamic*
Replace $recursiveAnchor: true with $dynamicAnchor: "meta" and update $recursiveRef to $dynamicRef accordingly.
1 parent 1875b36 commit 46ae014

10 files changed

+32
-31
lines changed

Diff for: hyper-schema.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"https://json-schema.org/draft/2019-09/vocab/content": true,
1111
"https://json-schema.org/draft/2019-09/vocab/hyper-schema": true
1212
},
13-
"$recursiveAnchor": true,
13+
"$dynamicAnchor": "meta",
1414

1515
"title": "JSON Hyper-Schema",
1616
"allOf": [

Diff for: links.json

+5-4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"$schema": "https://json-schema.org/draft/2019-09/hyper-schema",
33
"$id": "https://json-schema.org/draft/2019-09/links",
44
"title": "Link Description Object",
5+
56
"allOf": [
67
{ "required": [ "rel", "href" ] },
78
{ "$ref": "#/$defs/noRequiredFields" }
@@ -36,7 +37,7 @@
3637
"format": "uri-template"
3738
},
3839
"hrefSchema": {
39-
"$recursiveRef": "https://json-schema.org/draft/2019-09/hyper-schema",
40+
"$dynamicRef": "https://json-schema.org/draft/2019-09/hyper-schema#meta",
4041
"default": false
4142
},
4243
"templatePointers": {
@@ -63,23 +64,23 @@
6364
"type": "string"
6465
},
6566
"targetSchema": {
66-
"$recursiveRef": "https://json-schema.org/draft/2019-09/hyper-schema",
67+
"$dynamicRef": "https://json-schema.org/draft/2019-09/hyper-schema#meta",
6768
"default": true
6869
},
6970
"targetMediaType": {
7071
"type": "string"
7172
},
7273
"targetHints": { },
7374
"headerSchema": {
74-
"$recursiveRef": "https://json-schema.org/draft/2019-09/hyper-schema",
75+
"$dynamicRef": "https://json-schema.org/draft/2019-09/hyper-schema#meta",
7576
"default": true
7677
},
7778
"submissionMediaType": {
7879
"type": "string",
7980
"default": "application/json"
8081
},
8182
"submissionSchema": {
82-
"$recursiveRef": "https://json-schema.org/draft/2019-09/hyper-schema",
83+
"$dynamicRef": "https://json-schema.org/draft/2019-09/hyper-schema#meta",
8384
"default": true
8485
},
8586
"$comment": {

Diff for: meta/applicator.json

+15-15
Original file line numberDiff line numberDiff line change
@@ -4,47 +4,47 @@
44
"$vocabulary": {
55
"https://json-schema.org/draft/2019-09/vocab/applicator": true
66
},
7-
"$recursiveAnchor": true,
7+
"$dynamicAnchor": "meta",
88

99
"title": "Applicator vocabulary meta-schema",
1010
"properties": {
1111
"prefixItems": { "$ref": "#/$defs/schemaArray" },
12-
"items": { "$recursiveRef": "#" },
13-
"unevaluatedItems": { "$recursiveRef": "#" },
14-
"contains": { "$recursiveRef": "#" },
15-
"additionalProperties": { "$recursiveRef": "#" },
16-
"unevaluatedProperties": { "$recursiveRef": "#" },
12+
"items": { "$dynamicRef": "#meta" },
13+
"unevaluatedItems": { "$dynamicRef": "#meta" },
14+
"contains": { "$dynamicRef": "#meta" },
15+
"additionalProperties": { "$dynamicRef": "#meta" },
16+
"unevaluatedProperties": { "$dynamicRef": "#meta" },
1717
"properties": {
1818
"type": "object",
19-
"additionalProperties": { "$recursiveRef": "#" },
19+
"additionalProperties": { "$dynamicRef": "#meta" },
2020
"default": {}
2121
},
2222
"patternProperties": {
2323
"type": "object",
24-
"additionalProperties": { "$recursiveRef": "#" },
24+
"additionalProperties": { "$dynamicRef": "#meta" },
2525
"propertyNames": { "format": "regex" },
2626
"default": {}
2727
},
2828
"dependentSchemas": {
2929
"type": "object",
3030
"additionalProperties": {
31-
"$recursiveRef": "#"
31+
"$dynamicRef": "#meta"
3232
}
3333
},
34-
"propertyNames": { "$recursiveRef": "#" },
35-
"if": { "$recursiveRef": "#" },
36-
"then": { "$recursiveRef": "#" },
37-
"else": { "$recursiveRef": "#" },
34+
"propertyNames": { "$dynamicRef": "#meta" },
35+
"if": { "$dynamicRef": "#meta" },
36+
"then": { "$dynamicRef": "#meta" },
37+
"else": { "$dynamicRef": "#meta" },
3838
"allOf": { "$ref": "#/$defs/schemaArray" },
3939
"anyOf": { "$ref": "#/$defs/schemaArray" },
4040
"oneOf": { "$ref": "#/$defs/schemaArray" },
41-
"not": { "$recursiveRef": "#" }
41+
"not": { "$dynamicRef": "#meta" }
4242
},
4343
"$defs": {
4444
"schemaArray": {
4545
"type": "array",
4646
"minItems": 1,
47-
"items": { "$recursiveRef": "#" }
47+
"items": { "$dynamicRef": "#meta" }
4848
}
4949
}
5050
}

Diff for: meta/content.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
"$vocabulary": {
55
"https://json-schema.org/draft/2019-09/vocab/content": true
66
},
7-
"$recursiveAnchor": true,
7+
"$dynamicAnchor": "meta",
88

99
"title": "Content vocabulary meta-schema",
1010

1111
"type": ["object", "boolean"],
1212
"properties": {
1313
"contentMediaType": { "type": "string" },
1414
"contentEncoding": { "type": "string" },
15-
"contentSchema": { "$recursiveRef": "#" }
15+
"contentSchema": { "$dynamicRef": "#meta" }
1616
}
1717
}

Diff for: meta/core.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"$vocabulary": {
55
"https://json-schema.org/draft/2019-09/vocab/core": true
66
},
7-
"$recursiveAnchor": true,
7+
"$dynamicAnchor": "meta",
88

99
"title": "Core vocabulary meta-schema",
1010
"type": ["object", "boolean"],
@@ -51,7 +51,7 @@
5151
},
5252
"$defs": {
5353
"type": "object",
54-
"additionalProperties": { "$recursiveRef": "#" },
54+
"additionalProperties": { "$dynamicRef": "#meta" },
5555
"default": {}
5656
}
5757
}

Diff for: meta/format.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"$vocabulary": {
55
"https://json-schema.org/draft/2019-09/vocab/format": true
66
},
7-
"$recursiveAnchor": true,
7+
"$dynamicAnchor": "meta",
88

99
"title": "Format vocabulary meta-schema",
1010
"type": ["object", "boolean"],

Diff for: meta/hyper-schema.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"$vocabulary": {
55
"https://json-schema.org/draft/2019-09/vocab/hyper-schema": true
66
},
7-
"$recursiveAnchor": true,
7+
"$dynamicAnchor": "meta",
88

99
"title": "JSON Hyper-Schema Vocabulary Schema",
1010
"type": ["object", "boolean"],

Diff for: meta/meta-data.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"$vocabulary": {
55
"https://json-schema.org/draft/2019-09/vocab/meta-data": true
66
},
7-
"$recursiveAnchor": true,
7+
"$dynamicAnchor": "meta",
88

99
"title": "Meta-data vocabulary meta-schema",
1010

Diff for: meta/validation.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"$vocabulary": {
55
"https://json-schema.org/draft/2019-09/vocab/validation": true
66
},
7-
"$recursiveAnchor": true,
7+
"$dynamicAnchor": "meta",
88

99
"title": "Validation vocabulary meta-schema",
1010
"type": ["object", "boolean"],

Diff for: schema.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"https://json-schema.org/draft/2019-09/vocab/format": false,
1010
"https://json-schema.org/draft/2019-09/vocab/content": true
1111
},
12-
"$recursiveAnchor": true,
12+
"$dynamicAnchor": "meta",
1313

1414
"title": "Core and Validation specifications meta-schema",
1515
"allOf": [
@@ -25,15 +25,15 @@
2525
"definitions": {
2626
"$comment": "While no longer an official keyword as it is replaced by $defs, this keyword is retained in the meta-schema to prevent incompatible extensions as it remains in common use.",
2727
"type": "object",
28-
"additionalProperties": { "$recursiveRef": "#" },
28+
"additionalProperties": { "$dynamicRef": "#meta" },
2929
"default": {}
3030
},
3131
"dependencies": {
3232
"$comment": "\"dependencies\" is no longer a keyword, but schema authors should avoid redefining it to facilitate a smooth transition to \"dependentSchemas\" and \"dependentRequired\"",
3333
"type": "object",
3434
"additionalProperties": {
3535
"anyOf": [
36-
{ "$recursiveRef": "#" },
36+
{ "$dynamicRef": "#meta" },
3737
{ "$ref": "meta/validation#/$defs/stringArray" }
3838
]
3939
}

0 commit comments

Comments
 (0)