Skip to content

Commit 94a4c21

Browse files
add meta-schema files to sharedir
1 parent 75b4b95 commit 94a4c21

14 files changed

+647
-0
lines changed

dist.ini

+3
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,6 @@ Test::ReportPrereqs.include[0] = JSON::PP
1313
Test::ReportPrereqs.include[1] = Cpanel::JSON::XS
1414
Test::ReportPrereqs.include[2] = JSON::XS
1515
Test::ReportPrereqs.include[3] = Mojolicious
16+
17+
[ShareDir]
18+
dir = share

share/2019-09/hyper-schema.json

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2019-09/hyper-schema",
3+
"$id": "https://json-schema.org/draft/2019-09/hyper-schema",
4+
"$vocabulary": {
5+
"https://json-schema.org/draft/2019-09/vocab/core": true,
6+
"https://json-schema.org/draft/2019-09/vocab/applicator": true,
7+
"https://json-schema.org/draft/2019-09/vocab/validation": true,
8+
"https://json-schema.org/draft/2019-09/vocab/meta-data": true,
9+
"https://json-schema.org/draft/2019-09/vocab/format": false,
10+
"https://json-schema.org/draft/2019-09/vocab/content": true,
11+
"https://json-schema.org/draft/2019-09/vocab/hyper-schema": true
12+
},
13+
"$recursiveAnchor": true,
14+
15+
"title": "JSON Hyper-Schema",
16+
"allOf": [
17+
{"$ref": "https://json-schema.org/draft/2019-09/schema"},
18+
{"$ref": "https://json-schema.org/draft/2019-09/meta/hyper-schema"}
19+
],
20+
"links": [
21+
{
22+
"rel": "self",
23+
"href": "{+%24id}"
24+
}
25+
]
26+
}

share/2019-09/links.json

+91
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2019-09/hyper-schema",
3+
"$id": "https://json-schema.org/draft/2019-09/links",
4+
"title": "Link Description Object",
5+
"allOf": [
6+
{ "required": [ "rel", "href" ] },
7+
{ "$ref": "#/$defs/noRequiredFields" }
8+
],
9+
"$defs": {
10+
"noRequiredFields": {
11+
"type": "object",
12+
"properties": {
13+
"anchor": {
14+
"type": "string",
15+
"format": "uri-template"
16+
},
17+
"anchorPointer": {
18+
"type": "string",
19+
"anyOf": [
20+
{ "format": "json-pointer" },
21+
{ "format": "relative-json-pointer" }
22+
]
23+
},
24+
"rel": {
25+
"anyOf": [
26+
{ "type": "string" },
27+
{
28+
"type": "array",
29+
"items": { "type": "string" },
30+
"minItems": 1
31+
}
32+
]
33+
},
34+
"href": {
35+
"type": "string",
36+
"format": "uri-template"
37+
},
38+
"hrefSchema": {
39+
"$recursiveRef": "https://json-schema.org/draft/2019-09/hyper-schema",
40+
"default": false
41+
},
42+
"templatePointers": {
43+
"type": "object",
44+
"additionalProperties": {
45+
"type": "string",
46+
"anyOf": [
47+
{ "format": "json-pointer" },
48+
{ "format": "relative-json-pointer" }
49+
]
50+
}
51+
},
52+
"templateRequired": {
53+
"type": "array",
54+
"items": {
55+
"type": "string"
56+
},
57+
"uniqueItems": true
58+
},
59+
"title": {
60+
"type": "string"
61+
},
62+
"description": {
63+
"type": "string"
64+
},
65+
"targetSchema": {
66+
"$recursiveRef": "https://json-schema.org/draft/2019-09/hyper-schema",
67+
"default": true
68+
},
69+
"targetMediaType": {
70+
"type": "string"
71+
},
72+
"targetHints": { },
73+
"headerSchema": {
74+
"$recursiveRef": "https://json-schema.org/draft/2019-09/hyper-schema",
75+
"default": true
76+
},
77+
"submissionMediaType": {
78+
"type": "string",
79+
"default": "application/json"
80+
},
81+
"submissionSchema": {
82+
"$recursiveRef": "https://json-schema.org/draft/2019-09/hyper-schema",
83+
"default": true
84+
},
85+
"$comment": {
86+
"type": "string"
87+
}
88+
}
89+
}
90+
}
91+
}

share/2019-09/meta/applicator.json

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

share/2019-09/meta/content.json

+17
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+
}

share/2019-09/meta/core.json

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

share/2019-09/meta/format.json

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2019-09/schema",
3+
"$id": "https://json-schema.org/draft/2019-09/meta/format",
4+
"$vocabulary": {
5+
"https://json-schema.org/draft/2019-09/vocab/format": true
6+
},
7+
"$recursiveAnchor": true,
8+
9+
"title": "Format vocabulary meta-schema",
10+
"type": ["object", "boolean"],
11+
"properties": {
12+
"format": { "type": "string" }
13+
}
14+
}

share/2019-09/meta/hyper-schema.json

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2019-09/hyper-schema",
3+
"$id": "https://json-schema.org/draft/2019-09/meta/hyper-schema",
4+
"$vocabulary": {
5+
"https://json-schema.org/draft/2019-09/vocab/hyper-schema": true
6+
},
7+
"$recursiveAnchor": true,
8+
9+
"title": "JSON Hyper-Schema Vocabulary Schema",
10+
"type": ["object", "boolean"],
11+
"properties": {
12+
"base": {
13+
"type": "string",
14+
"format": "uri-template"
15+
},
16+
"links": {
17+
"type": "array",
18+
"items": {
19+
"$ref": "https://json-schema.org/draft/2019-09/links"
20+
}
21+
}
22+
},
23+
"links": [
24+
{
25+
"rel": "self",
26+
"href": "{+%24id}"
27+
}
28+
]
29+
}

share/2019-09/meta/meta-data.json

+37
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)