Skip to content

Commit fa873b9

Browse files
committed
updated base and core meta-schemas
1 parent 6c5b672 commit fa873b9

File tree

2 files changed

+32
-28
lines changed

2 files changed

+32
-28
lines changed

meta/core.json

Lines changed: 21 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -10,37 +10,18 @@
1010
"type": ["object", "boolean"],
1111
"properties": {
1212
"$id": {
13-
"type": "string",
14-
"format": "uri-reference",
13+
"$ref": "#/$defs/uriReferenceString",
1514
"$comment": "Non-empty fragments not allowed.",
1615
"pattern": "^[^#]*#?$"
1716
},
18-
"$schema": {
19-
"type": "string",
20-
"format": "uri"
21-
},
22-
"$anchor": {
23-
"type": "string",
24-
"pattern": "^[A-Za-z_][-A-Za-z0-9._]*$"
25-
},
26-
"$ref": {
27-
"type": "string",
28-
"format": "uri-reference"
29-
},
30-
"$dynamicRef": {
31-
"type": "string",
32-
"format": "uri-reference"
33-
},
34-
"$dynamicAnchor": {
35-
"type": "string",
36-
"pattern": "^[A-Za-z_][-A-Za-z0-9._]*$"
37-
},
17+
"$schema": { "$ref": "#/$defs/uriString" },
18+
"$ref": { "$ref": "#/$defs/uriReferenceString" },
19+
"$anchor": { "$ref": "#/$defs/anchorString" },
20+
"$dynamicRef": { "$ref": "#/$defs/uriReferenceString" },
21+
"$dynamicAnchor": { "$ref": "#/$defs/anchorString" },
3822
"$vocabulary": {
3923
"type": "object",
40-
"propertyNames": {
41-
"type": "string",
42-
"format": "uri"
43-
},
24+
"propertyNames": { "$ref": "#/$defs/uriString" },
4425
"additionalProperties": {
4526
"type": "boolean"
4627
}
@@ -53,5 +34,19 @@
5334
"additionalProperties": { "$dynamicRef": "#meta" },
5435
"default": {}
5536
}
37+
},
38+
"$defs": {
39+
"anchorString": {
40+
"type": "string",
41+
"pattern": "^[A-Za-z_][-A-Za-z0-9._]*$"
42+
},
43+
"uriString": {
44+
"type": "string",
45+
"format": "uri"
46+
},
47+
"uriReferenceString": {
48+
"type": "string",
49+
"format": "uri-reference"
50+
}
5651
}
5752
}

schema.json

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,22 +22,31 @@
2222
{"$ref": "meta/content"}
2323
],
2424
"type": ["object", "boolean"],
25+
"$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.",
2526
"properties": {
2627
"definitions": {
27-
"$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.",
28+
"$comment": "\"definitions\" has been replaced by \"$defs\".",
2829
"type": "object",
2930
"additionalProperties": { "$dynamicRef": "#meta" },
3031
"default": {}
3132
},
3233
"dependencies": {
33-
"$comment": "\"dependencies\" is no longer a keyword, but schema authors should avoid redefining it to facilitate a smooth transition to \"dependentSchemas\" and \"dependentRequired\"",
34+
"$comment": "\"dependencies\" has been split and replaced by \"dependentSchemas\" and \"dependentRequired\" in order to serve their differing semantics.",
3435
"type": "object",
3536
"additionalProperties": {
3637
"anyOf": [
3738
{ "$dynamicRef": "#meta" },
3839
{ "$ref": "meta/validation#/$defs/stringArray" }
3940
]
4041
}
42+
},
43+
"$recursiveAnchor": {
44+
"$comment": "\"$recursiveAnchor\" has been replaced by \"$dynamicAnchor\".",
45+
"$ref": "meta/core#/$defs/anchorString"
46+
},
47+
"$recursiveRef": {
48+
"$comment": "\"$recursiveRef\" has been replaced by \"$dynamicRef\".",
49+
"$ref": "meta/core#/$defs/uriReferenceString"
4150
}
4251
}
4352
}

0 commit comments

Comments
 (0)