Skip to content
This repository was archived by the owner on Nov 2, 2023. It is now read-only.

Commit 8018f32

Browse files
committed
Make most of the Draft 05 changes to meta-schemas
Core and Validation: * Add "$ref" to definitions (but don't integrate it yet as that requires some reorganization). * Use the newly added "uriref" format where appropriate. Hyper-Schema: * "rel" is now optional * Add "base" * Remove "fragmentResolution" and "pathStart" * Add links for the meta-schema itself
1 parent 54749a2 commit 8018f32

File tree

3 files changed

+26
-10
lines changed

3 files changed

+26
-10
lines changed

draft-05/hyper-schema

+14-8
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"linkDescription": {
1111
"title": "Link Description Object",
1212
"type": "object",
13-
"required": [ "href", "rel" ],
13+
"required": [ "href" ],
1414
"properties": {
1515
"href": {
1616
"type": "string"
@@ -82,13 +82,13 @@
8282
"oneOf": { "$ref": "#/definitions/schemaArray" },
8383
"not": { "$ref": "#" },
8484

85+
"base": {
86+
"type": "string"
87+
},
8588
"links": {
8689
"type": "array",
8790
"items": { "$ref": "#/definitions/linkDescription" }
8891
},
89-
"fragmentResolution": {
90-
"type": "string"
91-
},
9292
"media": {
9393
"type": "object",
9494
"properties": {
@@ -99,11 +99,17 @@
9999
"type": "string"
100100
}
101101
}
102+
}
103+
},
104+
"links": [
105+
{
106+
"rel": "self",
107+
"href": "{+id}"
102108
},
103-
"pathStart": {
104-
"type": "string",
105-
"format": "uri"
109+
{
110+
"rel": "full",
111+
"href": "{+($ref)}"
106112
}
107-
}
113+
]
108114
}
109115

draft-05/links

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"id": "http://json-schema.org/draft-05/links",
44
"title": "Link Description Object",
55
"type": "object",
6-
"required": [ "href", "rel" ],
6+
"required": [ "href" ],
77
"properties": {
88
"href": {
99
"type": "string"

draft-05/schema

+11-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,16 @@
33
"id": "http://json-schema.org/draft-05/schema",
44
"title": "Core schema meta-schema",
55
"definitions": {
6+
"jsonReference": {
7+
"type": "object",
8+
"properties": {
9+
"$ref": {
10+
"type": "string",
11+
"format": "uriref"
12+
}
13+
},
14+
"required": [ "$ref" ]
15+
},
616
"schemaArray": {
717
"type": "array",
818
"minItems": 1,
@@ -40,7 +50,7 @@
4050
"properties": {
4151
"id": {
4252
"type": "string",
43-
"format": "uri"
53+
"format": "uriref"
4454
},
4555
"$schema": {
4656
"type": "string",

0 commit comments

Comments
 (0)