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

Commit 5372503

Browse files
committed
Draft 05 changes, except for "$ref".
This uses "uriref" where appropriate and makes the various change to hyper-schema and links required by the changes to the hyper-schema spec.
1 parent 6aac006 commit 5372503

File tree

3 files changed

+16
-20
lines changed

3 files changed

+16
-20
lines changed

draft-05/hyper-schema

+9-13
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"$schema": "http://json-schema.org/draft-04/hyper-schema#",
3-
"id": "http://json-schema.org/draft-04/hyper-schema#",
2+
"$schema": "http://json-schema.org/draft-05/hyper-schema#",
3+
"id": "http://json-schema.org/draft-05/hyper-schema#",
44
"title": "JSON Hyper-Schema",
55
"definitions": {
66
"schemaArray": {
@@ -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
"description": "a URI template, as defined by RFC 6570, with the addition of the $, ( and ) characters for pre-processing",
@@ -33,7 +33,7 @@
3333
"type": "string"
3434
},
3535
"method": {
36-
"description": "method for requesting the target of the link (e.g. for HTTP this might be \"GET\" or \"DELETE\")",
36+
"description": "specifies that the client can construct a templated query (\"get\") or non-idempotent request (\"post\") to a resource.",
3737
"type": "string"
3838
},
3939
"encType": {
@@ -48,7 +48,7 @@
4848
}
4949
}
5050
},
51-
"allOf": [ { "$ref": "http://json-schema.org/draft-04/schema#" } ],
51+
"allOf": [ { "$ref": "http://json-schema.org/draft-05/schema#" } ],
5252
"properties": {
5353
"additionalItems": {
5454
"anyOf": [
@@ -90,13 +90,14 @@
9090
"oneOf": { "$ref": "#/definitions/schemaArray" },
9191
"not": { "$ref": "#" },
9292

93+
"base": {
94+
"description": "URI Template resolved as for the 'href' keyword in the Link Description Object. The resulting URI Reference is resolved against the current URI base and sets the new URI base for URI references within the instance.",
95+
"type": "string"
96+
},
9397
"links": {
9498
"type": "array",
9599
"items": { "$ref": "#/definitions/linkDescription" }
96100
},
97-
"fragmentResolution": {
98-
"type": "string"
99-
},
100101
"media": {
101102
"type": "object",
102103
"properties": {
@@ -110,11 +111,6 @@
110111
}
111112
}
112113
},
113-
"pathStart": {
114-
"description": "Instances' URIs must start with this value for this schema to apply to them",
115-
"type": "string",
116-
"format": "uri"
117-
},
118114
"readOnly": {
119115
"description": "If true, indicates that the value of this property is controlled by the server.",
120116
"type": "boolean",

draft-05/links

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
2-
"$schema": "http://json-schema.org/draft-04/hyper-schema#",
3-
"id": "http://json-schema.org/draft-04/links#",
2+
"$schema": "http://json-schema.org/draft-05/hyper-schema#",
3+
"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
"description": "a URI template, as defined by RFC 6570, with the addition of the $, ( and ) characters for pre-processing",
@@ -26,7 +26,7 @@
2626
"type": "string"
2727
},
2828
"method": {
29-
"description": "method for requesting the target of the link (e.g. for HTTP this might be \"GET\" or \"DELETE\")",
29+
"description": "specifies that the client can construct a templated query (\"get\") or non-idempotent request (\"post\") to a resource.",
3030
"type": "string"
3131
},
3232
"encType": {

draft-05/schema

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"$schema": "http://json-schema.org/draft-04/schema#",
3-
"id": "http://json-schema.org/draft-04/schema#",
2+
"$schema": "http://json-schema.org/draft-05/schema#",
3+
"id": "http://json-schema.org/draft-05/schema#",
44
"title": "Core schema meta-schema",
55
"definitions": {
66
"schemaArray": {
@@ -40,7 +40,7 @@
4040
"properties": {
4141
"id": {
4242
"type": "string",
43-
"format": "uri"
43+
"format": "uriref"
4444
},
4545
"$schema": {
4646
"type": "string",

0 commit comments

Comments
 (0)