Skip to content

Commit 8c1e8af

Browse files
committed
Schema URIs are now namespace versioned.
Added simple string format for the "dependencies" attribute. Added "$ref" and "$schema" attribute definitions.
1 parent f2f4141 commit 8c1e8af

28 files changed

+1231
-277
lines changed

address

Lines changed: 0 additions & 12 deletions
This file was deleted.

calendar

Lines changed: 0 additions & 20 deletions
This file was deleted.

card

Lines changed: 0 additions & 43 deletions
This file was deleted.

draft-00/hyper-schema

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
{
2+
"$schema" : "http://json-schema.org/draft-00/hyper-schema#",
3+
"id" : "http://json-schema.org/draft-00/hyper-schema#",
4+
5+
"properties" : {
6+
"links" : {
7+
"type" : "array",
8+
"items" : {"$ref" : "http://json-schema.org/draft-00/links#"},
9+
"optional" : true
10+
},
11+
12+
"fragmentResolution" : {
13+
"type" : "string",
14+
"optional" : true,
15+
"default" : "dot-delimited"
16+
},
17+
18+
"root" : {
19+
"type" : "boolean",
20+
"optional" : true,
21+
"default" : false
22+
},
23+
24+
"readonly" : {
25+
"type" : "boolean",
26+
"optional" : true,
27+
"default" : false
28+
},
29+
30+
"pathStart" : {
31+
"type" : "string",
32+
"optional" : true,
33+
"format" : "uri"
34+
},
35+
36+
"mediaType" : {
37+
"type" : "string",
38+
"optional" : true,
39+
"format" : "media-type"
40+
},
41+
42+
"alternate" : {
43+
"type" : "array",
44+
"items" : {"$ref" : "#"},
45+
"optional" : true
46+
}
47+
},
48+
49+
"links" : [
50+
{
51+
"href" : "{$ref}",
52+
"rel" : "full"
53+
},
54+
55+
{
56+
"href" : "{$schema}",
57+
"rel" : "describedby"
58+
},
59+
60+
{
61+
"href" : "{id}",
62+
"rel" : "self"
63+
}
64+
],
65+
66+
"fragmentResolution" : "dot-delimited",
67+
"extends" : {"$ref" : "http://json-schema.org/draft-00/schema#"}
68+
}

json-ref renamed to draft-00/json-ref

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
2-
"$schema" : "http://json-schema.org/hyper-schema",
3-
"id" : "http://json-schema.org/json-ref",
2+
"$schema" : "http://json-schema.org/draft-00/hyper-schema#",
3+
"id" : "http://json-schema.org/draft-00/json-ref#",
44

5-
"items" : "#",
6-
"additionalProperties" : "#",
5+
"items" : {"$ref" : "#"},
6+
"additionalProperties" : {"$ref" : "#"},
77

88
"links" : [
99
{

draft-00/links

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"$schema" : "http://json-schema.org/draft-00/hyper-schema#",
3+
"id" : "http://json-schema.org/draft-00/links#",
4+
"type" : "object",
5+
6+
"properties" : {
7+
"href" : {
8+
"type" : "string"
9+
},
10+
11+
"rel" : {
12+
"type" : "string"
13+
},
14+
15+
"method" : {
16+
"type" : "string",
17+
"default" : "GET",
18+
"optional" : true
19+
},
20+
21+
"enctype" : {
22+
"type" : "string",
23+
"requires" : "method",
24+
"optional" : true
25+
},
26+
27+
"properties" : {
28+
"type" : "object",
29+
"additionalProperties" : {"$ref" : "http://json-schema.org/draft-00/hyper-schema#"},
30+
"optional" : true
31+
}
32+
}
33+
}

draft-00/schema

Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
{
2+
"$schema" : "http://json-schema.org/draft-00/hyper-schema#",
3+
"id" : "http://json-schema.org/draft-00/schema#",
4+
"type" : "object",
5+
6+
"properties" : {
7+
"type" : {
8+
"type" : ["string", "array"],
9+
"items" : {
10+
"type" : ["string", {"$ref" : "#"}]
11+
},
12+
"optional" : true,
13+
"default" : "any"
14+
},
15+
16+
"properties" : {
17+
"type" : "object",
18+
"additionalProperties" : {"$ref" : "#"},
19+
"optional" : true,
20+
"default" : {}
21+
},
22+
23+
"items" : {
24+
"type" : [{"$ref" : "#"}, "array"],
25+
"items" : {"$ref" : "#"},
26+
"optional" : true,
27+
"default" : {}
28+
},
29+
30+
"optional" : {
31+
"type" : "boolean",
32+
"optional" : true,
33+
"default" : false
34+
},
35+
36+
"additionalProperties" : {
37+
"type" : [{"$ref" : "#"}, "boolean"],
38+
"optional" : true,
39+
"default" : {}
40+
},
41+
42+
"requires" : {
43+
"type" : ["string", {"$ref" : "#"}],
44+
"optional" : true
45+
},
46+
47+
"minimum" : {
48+
"type" : "number",
49+
"optional" : true
50+
},
51+
52+
"maximum" : {
53+
"type" : "number",
54+
"optional" : true
55+
},
56+
57+
"minimumCanEqual" : {
58+
"type" : "boolean",
59+
"optional" : true,
60+
"requires" : "minimum",
61+
"default" : true
62+
},
63+
64+
"maximumCanEqual" : {
65+
"type" : "boolean",
66+
"optional" : true,
67+
"requires" : "maximum",
68+
"default" : true
69+
},
70+
71+
"minItems" : {
72+
"type" : "integer",
73+
"optional" : true,
74+
"minimum" : 0,
75+
"default" : 0
76+
},
77+
78+
"maxItems" : {
79+
"type" : "integer",
80+
"optional" : true,
81+
"minimum" : 0
82+
},
83+
84+
"pattern" : {
85+
"type" : "string",
86+
"optional" : true,
87+
"format" : "regex"
88+
},
89+
90+
"minLength" : {
91+
"type" : "integer",
92+
"optional" : true,
93+
"minimum" : 0,
94+
"default" : 0
95+
},
96+
97+
"maxLength" : {
98+
"type" : "integer",
99+
"optional" : true
100+
},
101+
102+
"enum" : {
103+
"type" : "array",
104+
"optional" : true,
105+
"minItems" : 1
106+
},
107+
108+
"title" : {
109+
"type" : "string",
110+
"optional" : true
111+
},
112+
113+
"description" : {
114+
"type" : "string",
115+
"optional" : true
116+
},
117+
118+
"format" : {
119+
"type" : "string",
120+
"optional" : true
121+
},
122+
123+
"contentEncoding" : {
124+
"type" : "string",
125+
"optional" : true
126+
},
127+
128+
"default" : {
129+
"type" : "any",
130+
"optional" : true
131+
},
132+
133+
"maxDecimal" : {
134+
"type" : "integer",
135+
"optional" : true,
136+
"minimum" : 0
137+
},
138+
139+
"disallow" : {
140+
"type" : ["string", "array"],
141+
"items" : {"type" : "string"},
142+
"optional" : true
143+
},
144+
145+
"extends" : {
146+
"type" : [{"$ref" : "#"}, "array"],
147+
"items" : {"$ref" : "#"},
148+
"optional" : true,
149+
"default" : {}
150+
}
151+
},
152+
153+
"optional" : true,
154+
"default" : {}
155+
}

0 commit comments

Comments
 (0)