Skip to content

Commit 314b5c3

Browse files
committed
Initial commit with current (appearent) texts
0 parents  commit 314b5c3

12 files changed

+3679
-0
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
jsonschema-*.html
2+
jsonschema-*.txt

Makefile

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
XML2RFC=xml2rfc
2+
3+
OUT = \
4+
jsonschema-core.html jsonschema-core.txt \
5+
jsonschema-schema.html jsonschema-schema.txt \
6+
jsonschema-hyperschema.html jsonschema-hyperschema.txt
7+
8+
9+
all: $(OUT)
10+
11+
%.txt: %.xml
12+
$(XML2RFC) --text $< -o $@
13+
14+
%.html: %.xml
15+
$(XML2RFC) --html $< -o $@
16+
17+
clean:
18+
rm -f $(OUT)
19+
20+
.PHONY: clean

README.md

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
## Welcome to JSON Schema
2+
3+
This repository contains the current, and historical, JSON Schema
4+
specifications.
5+
6+
## Call for reviews
7+
8+
Specifications are starting to get written. Reviews, comments and suggestions
9+
are of paramount importance to JSON Schema. It is humbly asked to you, dear
10+
reader, that you bring your contribution.
11+
12+
## The website
13+
14+
The JSON Schema web site is at http://json-schema.org/
15+
16+
## License
17+
18+
The source material in this repository is licensed under the AFL or BSD license.

archive/draft-03/hyper-schema.json

Whitespace-only changes.

archive/draft-03/schema.json

Whitespace-only changes.

archive/draft-04/hyper-schema.json

+168
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-04/hyper-schema#",
3+
"id": "http://json-schema.org/draft-04/hyper-schema#",
4+
"title": "JSON Hyper-Schema",
5+
"allOf": [
6+
{
7+
"$ref": "http://json-schema.org/draft-04/schema#"
8+
}
9+
],
10+
"properties": {
11+
"additionalItems": {
12+
"anyOf": [
13+
{
14+
"type": "boolean"
15+
},
16+
{
17+
"$ref": "#"
18+
}
19+
]
20+
},
21+
"additionalProperties": {
22+
"anyOf": [
23+
{
24+
"type": "boolean"
25+
},
26+
{
27+
"$ref": "#"
28+
}
29+
]
30+
},
31+
"dependencies": {
32+
"additionalProperties": {
33+
"anyOf": [
34+
{
35+
"$ref": "#"
36+
},
37+
{
38+
"type": "array"
39+
}
40+
]
41+
}
42+
},
43+
"items": {
44+
"anyOf": [
45+
{
46+
"$ref": "#"
47+
},
48+
{
49+
"$ref": "#/definitions/schemaArray"
50+
}
51+
]
52+
},
53+
"definitions": {
54+
"additionalProperties": {
55+
"$ref": "#"
56+
}
57+
},
58+
"patternProperties": {
59+
"additionalProperties": {
60+
"$ref": "#"
61+
}
62+
},
63+
"properties": {
64+
"additionalProperties": {
65+
"$ref": "#"
66+
}
67+
},
68+
"allOf": {
69+
"$ref": "#/definitions/schemaArray"
70+
},
71+
"anyOf": {
72+
"$ref": "#/definitions/schemaArray"
73+
},
74+
"oneOf": {
75+
"$ref": "#/definitions/schemaArray"
76+
},
77+
"not": {
78+
"$ref": "#"
79+
},
80+
81+
"links": {
82+
"type": "array",
83+
"items": {
84+
"$ref": "#/definitions/linkDescription"
85+
}
86+
},
87+
"fragmentResolution": {
88+
"type": "string"
89+
},
90+
"media": {
91+
"type": "object",
92+
"properties": {
93+
"type": {
94+
"description": "A media type, as described in RFC 2046",
95+
"type": "string"
96+
},
97+
"binaryEncoding": {
98+
"description": "A content encoding scheme, as described in RFC 2045",
99+
"type": "string"
100+
}
101+
}
102+
},
103+
"pathStart": {
104+
"description": "Instances' URIs must start with this value for this schema to apply to them",
105+
"type": "string",
106+
"format": "uri"
107+
}
108+
},
109+
"definitions": {
110+
"schemaArray": {
111+
"type": "array",
112+
"items": {
113+
"$ref": "#"
114+
}
115+
},
116+
"linkDescription": {
117+
"title": "Link Description Object",
118+
"type": "object",
119+
"required": [ "href", "rel" ],
120+
"properties": {
121+
"href": {
122+
"description": "a URI template, as defined by RFC 6570, with the addition of the $, ( and ) characters for pre-processing",
123+
"type": "string"
124+
},
125+
"rel": {
126+
"description": "relation to the target resource of the link",
127+
"type": "string"
128+
},
129+
"title": {
130+
"description": "a title for the link",
131+
"type": "string"
132+
},
133+
"targetSchema": {
134+
"description": "JSON Schema describing the link target",
135+
"$ref": "#"
136+
},
137+
"mediaType": {
138+
"description": "media type (as defined by RFC 2046) describing the link target",
139+
"type": "string"
140+
},
141+
"method": {
142+
"description": "method for requesting the target of the link (e.g. for HTTP this might be \"GET\" or \"DELETE\")",
143+
"type": "string"
144+
},
145+
"encType": {
146+
"description": "The media type in which to submit data along with the request",
147+
"type": "string",
148+
"default": "application/json"
149+
},
150+
"schema": {
151+
"description": "Schema describing the data to submit along with the request",
152+
"$ref": "#"
153+
}
154+
}
155+
}
156+
},
157+
"links": [
158+
{
159+
"rel": "self",
160+
"href": "{+id}"
161+
},
162+
{
163+
"rel": "full",
164+
"href": "{+($ref)}"
165+
}
166+
]
167+
}
168+

archive/draft-04/schema.json

Whitespace-only changes.

hyper-schema.json

+131
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-04/hyper-schema#",
3+
"id": "http://json-schema.org/draft-04/hyper-schema#",
4+
"title": "JSON Hyper-Schema",
5+
"allOf": [
6+
{"$ref": "http://json-schema.org/draft-04/schema#"}
7+
],
8+
"properties": {
9+
"additionalItems": {
10+
"anyOf": [
11+
{"type": "boolean"},
12+
{"$ref": "#"}
13+
]
14+
},
15+
"additionalProperties": {
16+
"anyOf": [
17+
{"type": "boolean"},
18+
{"$ref": "#"}
19+
]
20+
},
21+
"dependencies": {
22+
"additionalProperties": {
23+
"anyOf": [
24+
{"$ref": "#"},
25+
{"type": "array"}
26+
]
27+
}
28+
},
29+
"items": {
30+
"anyOf": [
31+
{"$ref": "#"},
32+
{"$ref": "#/definitions/schemaArray"}
33+
]
34+
},
35+
"definitions": {
36+
"additionalProperties": {"$ref": "#"}
37+
},
38+
"patternProperties": {
39+
"additionalProperties": {"$ref": "#"}
40+
},
41+
"properties": {
42+
"additionalProperties": {"$ref": "#"}
43+
},
44+
"allOf": {"$ref": "#/definitions/schemaArray"},
45+
"anyOf": {"$ref": "#/definitions/schemaArray"},
46+
"oneOf": {"$ref": "#/definitions/schemaArray"},
47+
"not": { "$ref": "#" },
48+
49+
"links": {
50+
"type": "array",
51+
"items": {"$ref": "#/definitions/linkDescription"}
52+
},
53+
"fragmentResolution": {
54+
"type": "string"
55+
},
56+
"media": {
57+
"type": "object",
58+
"properties": {
59+
"type": {
60+
"description": "A media type, as described in RFC 2046",
61+
"type": "string"
62+
},
63+
"binaryEncoding": {
64+
"description": "A content encoding scheme, as described in RFC 2045",
65+
"type": "string"
66+
}
67+
}
68+
},
69+
"pathStart": {
70+
"description": "Instances' URIs must start with this value for this schema to apply to them",
71+
"type": "string",
72+
"format": "uri"
73+
}
74+
},
75+
"definitions": {
76+
"schemaArray": {
77+
"type": "array",
78+
"items": {"$ref": "#"}
79+
},
80+
"linkDescription": {
81+
"title": "Link Description Object",
82+
"type": "object",
83+
"required": ["href", "rel"],
84+
"properties": {
85+
"href": {
86+
"description": "a URI template, as defined by RFC 6570, with the addition of the $, ( and ) characters for pre-processing",
87+
"type": "string"
88+
},
89+
"rel": {
90+
"description": "relation to the target resource of the link",
91+
"type": "string"
92+
},
93+
"title": {
94+
"description": "a title for the link",
95+
"type": "string"
96+
},
97+
"targetSchema": {
98+
"description": "JSON Schema describing the link target",
99+
"$ref": "#"
100+
},
101+
"mediaType": {
102+
"description": "media type (as defined by RFC 2046) describing the link target",
103+
"type": "string"
104+
},
105+
"method": {
106+
"description": "method for requesting the target of the link (e.g. for HTTP this might be \"GET\" or \"DELETE\")",
107+
"type": "string"
108+
},
109+
"encType": {
110+
"description": "The media type in which to submit data along with the request",
111+
"type": "string",
112+
"default": "application/json"
113+
},
114+
"schema": {
115+
"description": "Schema describing the data to submit along with the request",
116+
"$ref": "#"
117+
}
118+
}
119+
}
120+
},
121+
"links": [
122+
{
123+
"rel": "self",
124+
"href": "{+id}"
125+
},
126+
{
127+
"rel": "full",
128+
"href": "{+($ref)}"
129+
}
130+
]
131+
}

0 commit comments

Comments
 (0)