Skip to content

Commit 7395658

Browse files
authored
Merge pull request #671 from handrews/vocab-basic
"$vocabulary" and basic vocabulary support.
2 parents 9bf78da + 529b5b1 commit 7395658

File tree

4 files changed

+421
-66
lines changed

4 files changed

+421
-66
lines changed

Diff for: applicator.json

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

Diff for: core.json

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
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+
"const": true,
31+
"default": false
32+
},
33+
"$vocabulary": {
34+
"type": "object",
35+
"propertyNames": {
36+
"type": "string",
37+
"format": "uri"
38+
},
39+
"additionalProperties": {
40+
"type": "boolean"
41+
}
42+
},
43+
"$comment": {
44+
"type": "string"
45+
},
46+
"$defs": {
47+
"type": "object",
48+
"additionalProperties": { "$recursiveRef": "#" },
49+
"default": {}
50+
}
51+
}
52+
}

0 commit comments

Comments
 (0)