Skip to content

Commit 713e66a

Browse files
committed
Core and Applicator vocabulary meta-schemas
These are the single-vocabulary meta-schemas. In a future commit, the regular "schema" and "hyper-schema" meta-schemas will be updated to reference these, and use "$vocabulary". This commit just establishes these two meta-schemas on their own.
1 parent 0359124 commit 713e66a

File tree

2 files changed

+110
-0
lines changed

2 files changed

+110
-0
lines changed

applicator.json

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-08/schema#",
3+
"$id": "https://json-schema.org/draft-08/applicator",
4+
"$recursiveAnchor": true,
5+
"$vocabulary": {
6+
"https://json-schema.org/draft-08/vocabularies/applicator": true
7+
},
8+
9+
"title": "Applicator vocabulary meta-schema",
10+
"$defs": {
11+
"schemaArray": {
12+
"type": "array",
13+
"minItems": 1,
14+
"items": { "$recursiveRef": "#" }
15+
}
16+
},
17+
"properties": {
18+
"additionalItems": { "$recursiveRef": "#" },
19+
"unevaluatedItems": { "$recursiveRef": "#" },
20+
"items": {
21+
"anyOf": [
22+
{ "$recursiveRef": "#" },
23+
{ "$ref": "#/$defs/schemaArray" }
24+
]
25+
},
26+
"contains": { "$recursiveRef": "#" },
27+
"additionalProperties": { "$recursiveRef": "#" },
28+
"unevaluatedProperties": {
29+
"type": "object",
30+
"additionalProperties": {
31+
"$recursiveRef": "#"
32+
}
33+
},
34+
"properties": {
35+
"type": "object",
36+
"additionalProperties": { "$recursiveRef": "#" },
37+
"default": {}
38+
},
39+
"patternProperties": {
40+
"type": "object",
41+
"additionalProperties": { "$recursiveRef": "#" },
42+
"propertyNames": { "format": "regex" },
43+
"default": {}
44+
},
45+
"dependentSchemas": {
46+
"type": "object",
47+
"additionalProperties": {
48+
"$recursiveRef": "#"
49+
}
50+
},
51+
"propertyNames": { "$recursiveRef": "#" },
52+
"if": { "$recursiveRef": "#" },
53+
"then": { "$recursiveRef": "#" },
54+
"else": { "$recursiveRef": "#" },
55+
"allOf": { "$ref": "#/$defs/schemaArray" },
56+
"anyOf": { "$ref": "#/$defs/schemaArray" },
57+
"oneOf": { "$ref": "#/$defs/schemaArray" },
58+
"not": { "$recursiveRef": "#" }
59+
}
60+
}

core.json

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-08/schema#",
3+
"$id": "https://json-schema.org/draft-08/core",
4+
"$recursiveAnchor": true,
5+
"$vocabulary": {
6+
"https://json-schema.org/draft-08/vocabularies/core": true
7+
},
8+
9+
"title": "Core vocabulary meta-schema",
10+
"type": ["object", "boolean"],
11+
"properties": {
12+
"$id": {
13+
"type": "string",
14+
"format": "uri-reference"
15+
},
16+
"$schema": {
17+
"type": "string",
18+
"format": "uri"
19+
},
20+
"$ref": {
21+
"type": "string",
22+
"format": "uri-reference"
23+
},
24+
"$recursiveRef": {
25+
"type": "string",
26+
"format": "uri-reference"
27+
},
28+
"$recursiveAnchor": {
29+
"type": "boolean"
30+
},
31+
"$vocabulary": {
32+
"type": "object",
33+
"propertyNames": {
34+
"type": "string",
35+
"format": "uri"
36+
},
37+
"additionalProperties": {
38+
"type": "boolean"
39+
}
40+
},
41+
"$comment": {
42+
"type": "string"
43+
},
44+
"$defs": {
45+
"type": "object",
46+
"additionalProperties": { "$recursiveRef": "#" },
47+
"default": {}
48+
}
49+
}
50+
}

0 commit comments

Comments
 (0)