Skip to content

Commit d6eadbd

Browse files
committed
Draft 03: draft-zyp-json-schema-03
2 parents 707f650 + 2d6f968 commit d6eadbd

File tree

5 files changed

+546
-463
lines changed

5 files changed

+546
-463
lines changed

hyper-schema.json

Lines changed: 14 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,50 @@
11
{
2-
"$schema" : "http://json-schema.org/draft-02/hyper-schema#",
3-
"id" : "http://json-schema.org/draft-02/hyper-schema#",
2+
"$schema" : "http://json-schema.org/draft-03/hyper-schema#",
3+
"extends" : {"$ref" : "http://json-schema.org/draft-03/schema#"}
4+
"id" : "http://json-schema.org/draft-03/hyper-schema#",
45

56
"properties" : {
67
"links" : {
78
"type" : "array",
8-
"items" : {"$ref" : "http://json-schema.org/draft-02/links#"},
9-
"optional" : true
9+
"items" : {"$ref" : "http://json-schema.org/draft-03/links#"}
1010
},
1111

1212
"fragmentResolution" : {
1313
"type" : "string",
14-
"optional" : true,
1514
"default" : "slash-delimited"
1615
},
1716

1817
"root" : {
1918
"type" : "boolean",
20-
"optional" : true,
2119
"default" : false
2220
},
2321

2422
"readonly" : {
2523
"type" : "boolean",
26-
"optional" : true,
2724
"default" : false
2825
},
2926

27+
"contentEncoding" : {
28+
"type" : "string"
29+
},
30+
3031
"pathStart" : {
3132
"type" : "string",
32-
"optional" : true,
3333
"format" : "uri"
3434
},
3535

3636
"mediaType" : {
3737
"type" : "string",
38-
"optional" : true,
3938
"format" : "media-type"
40-
},
41-
42-
"alternate" : {
43-
"type" : "array",
44-
"items" : {"$ref" : "#"},
45-
"optional" : true
4639
}
4740
},
4841

4942
"links" : [
43+
{
44+
"href" : "{id}",
45+
"rel" : "self"
46+
},
47+
5048
{
5149
"href" : "{$ref}",
5250
"rel" : "full"
@@ -55,14 +53,8 @@
5553
{
5654
"href" : "{$schema}",
5755
"rel" : "describedby"
58-
},
59-
60-
{
61-
"href" : "{id}",
62-
"rel" : "self"
6356
}
6457
],
6558

66-
"fragmentResolution" : "slash-delimited",
67-
"extends" : {"$ref" : "http://json-schema.org/draft-02/schema#"}
59+
"fragmentResolution" : "slash-delimited"
6860
}

json-ref.json

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

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

88
"links" : [
9+
{
10+
"href" : "{id}",
11+
"rel" : "self"
12+
},
13+
914
{
1015
"href" : "{$ref}",
1116
"rel" : "full"
@@ -14,11 +19,6 @@
1419
{
1520
"href" : "{$schema}",
1621
"rel" : "describedby"
17-
},
18-
19-
{
20-
"href" : "{id}",
21-
"rel" : "self"
2222
}
2323
],
2424

0 commit comments

Comments
 (0)