Skip to content

Commit 4f8f346

Browse files
committed
Un-bundle single-vocabulary meta-schemas.
This seems to work (thanks @FFY00), even though previously I thought I was having issues with importlib.resources. Let's see if CI agrees.
1 parent 7830605 commit 4f8f346

File tree

16 files changed

+578
-2
lines changed

16 files changed

+578
-2
lines changed

jsonschema/schemas/vocabularies.json

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2019-09/schema",
3+
"$id": "https://json-schema.org/draft/2019-09/meta/applicator",
4+
"$vocabulary": {
5+
"https://json-schema.org/draft/2019-09/vocab/applicator": true
6+
},
7+
"$recursiveAnchor": true,
8+
9+
"title": "Applicator vocabulary meta-schema",
10+
"type": ["object", "boolean"],
11+
"properties": {
12+
"additionalItems": { "$recursiveRef": "#" },
13+
"unevaluatedItems": { "$recursiveRef": "#" },
14+
"items": {
15+
"anyOf": [
16+
{ "$recursiveRef": "#" },
17+
{ "$ref": "#/$defs/schemaArray" }
18+
]
19+
},
20+
"contains": { "$recursiveRef": "#" },
21+
"additionalProperties": { "$recursiveRef": "#" },
22+
"unevaluatedProperties": { "$recursiveRef": "#" },
23+
"properties": {
24+
"type": "object",
25+
"additionalProperties": { "$recursiveRef": "#" },
26+
"default": {}
27+
},
28+
"patternProperties": {
29+
"type": "object",
30+
"additionalProperties": { "$recursiveRef": "#" },
31+
"propertyNames": { "format": "regex" },
32+
"default": {}
33+
},
34+
"dependentSchemas": {
35+
"type": "object",
36+
"additionalProperties": {
37+
"$recursiveRef": "#"
38+
}
39+
},
40+
"propertyNames": { "$recursiveRef": "#" },
41+
"if": { "$recursiveRef": "#" },
42+
"then": { "$recursiveRef": "#" },
43+
"else": { "$recursiveRef": "#" },
44+
"allOf": { "$ref": "#/$defs/schemaArray" },
45+
"anyOf": { "$ref": "#/$defs/schemaArray" },
46+
"oneOf": { "$ref": "#/$defs/schemaArray" },
47+
"not": { "$recursiveRef": "#" }
48+
},
49+
"$defs": {
50+
"schemaArray": {
51+
"type": "array",
52+
"minItems": 1,
53+
"items": { "$recursiveRef": "#" }
54+
}
55+
}
56+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2019-09/schema",
3+
"$id": "https://json-schema.org/draft/2019-09/meta/content",
4+
"$vocabulary": {
5+
"https://json-schema.org/draft/2019-09/vocab/content": true
6+
},
7+
"$recursiveAnchor": true,
8+
9+
"title": "Content vocabulary meta-schema",
10+
11+
"type": ["object", "boolean"],
12+
"properties": {
13+
"contentMediaType": { "type": "string" },
14+
"contentEncoding": { "type": "string" },
15+
"contentSchema": { "$recursiveRef": "#" }
16+
}
17+
}
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2019-09/schema",
3+
"$id": "https://json-schema.org/draft/2019-09/meta/core",
4+
"$vocabulary": {
5+
"https://json-schema.org/draft/2019-09/vocab/core": true
6+
},
7+
"$recursiveAnchor": true,
8+
9+
"title": "Core vocabulary meta-schema",
10+
"type": ["object", "boolean"],
11+
"properties": {
12+
"$id": {
13+
"type": "string",
14+
"format": "uri-reference",
15+
"$comment": "Non-empty fragments not allowed.",
16+
"pattern": "^[^#]*#?$"
17+
},
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+
"$recursiveRef": {
31+
"type": "string",
32+
"format": "uri-reference"
33+
},
34+
"$recursiveAnchor": {
35+
"type": "boolean",
36+
"default": false
37+
},
38+
"$vocabulary": {
39+
"type": "object",
40+
"propertyNames": {
41+
"type": "string",
42+
"format": "uri"
43+
},
44+
"additionalProperties": {
45+
"type": "boolean"
46+
}
47+
},
48+
"$comment": {
49+
"type": "string"
50+
},
51+
"$defs": {
52+
"type": "object",
53+
"additionalProperties": { "$recursiveRef": "#" },
54+
"default": {}
55+
}
56+
}
57+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2019-09/schema",
3+
"$id": "https://json-schema.org/draft/2019-09/meta/meta-data",
4+
"$vocabulary": {
5+
"https://json-schema.org/draft/2019-09/vocab/meta-data": true
6+
},
7+
"$recursiveAnchor": true,
8+
9+
"title": "Meta-data vocabulary meta-schema",
10+
11+
"type": ["object", "boolean"],
12+
"properties": {
13+
"title": {
14+
"type": "string"
15+
},
16+
"description": {
17+
"type": "string"
18+
},
19+
"default": true,
20+
"deprecated": {
21+
"type": "boolean",
22+
"default": false
23+
},
24+
"readOnly": {
25+
"type": "boolean",
26+
"default": false
27+
},
28+
"writeOnly": {
29+
"type": "boolean",
30+
"default": false
31+
},
32+
"examples": {
33+
"type": "array",
34+
"items": true
35+
}
36+
}
37+
}

0 commit comments

Comments
 (0)