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

Commit beeae19

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 beeae19

File tree

3 files changed

+29
-9
lines changed

3 files changed

+29
-9
lines changed

draft-05/hyper-schema

Lines changed: 17 additions & 7 deletions
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,12 +82,16 @@
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"
92+
"readOnly": {
93+
"type": "boolean",
94+
"default": false
9195
},
9296
"media": {
9397
"type": "object",
@@ -99,11 +103,17 @@
99103
"type": "string"
100104
}
101105
}
106+
}
107+
},
108+
"links": [
109+
{
110+
"rel": "self",
111+
"href": "{+id}"
102112
},
103-
"pathStart": {
104-
"type": "string",
105-
"format": "uri"
113+
{
114+
"rel": "full",
115+
"href": "{+($ref)}"
106116
}
107-
}
117+
]
108118
}
109119

draft-05/links

Lines changed: 1 addition & 1 deletion
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

Lines changed: 11 additions & 1 deletion
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)