Skip to content

Commit 9f262b2

Browse files
committed
allow uri-reference in schema
As discussed in json-api#898 JSON API specification does not make any assertions about URI structure. Also specification contains examples using "relative URIs". RFC 3986, which is referenced by JSON Schema specification, distinguish between an uri and an uri reference like "relative" or "partial URIs": > 1.2.3. Hierarchical Identifiers > [...] > NOTE: Previous specifications used the terms "partial URI" and "relative > URI" to denote a relative reference to a URI. As some readers misunderstood > those terms to mean that relative URIs are a subset of URIs rather than > a method of referencing URIs, this specification simply refers to them as > relative references. Therefore relative URIs would fail validation if `uri` format (8.3.6 in JSON Schema draft) is used. `uri-reference` format (8.3.7) allow both.
1 parent 509ee94 commit 9f262b2

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

schema

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@
158158
"self": {
159159
"description": "A `self` member, whose value is a URL for the relationship itself (a \"relationship URL\"). This URL allows the client to directly manipulate the relationship. For example, it would allow a client to remove an `author` from an `article` without deleting the people resource itself.",
160160
"type": "string",
161-
"format": "uri"
161+
"format": "uri-reference"
162162
},
163163
"related": {
164164
"$ref": "#/definitions/link"
@@ -172,7 +172,7 @@
172172
{
173173
"description": "A string containing the link's URL.",
174174
"type": "string",
175-
"format": "uri"
175+
"format": "uri-reference"
176176
},
177177
{
178178
"type": "object",
@@ -183,7 +183,7 @@
183183
"href": {
184184
"description": "A string containing the link's URL.",
185185
"type": "string",
186-
"format": "uri"
186+
"format": "uri-reference"
187187
},
188188
"meta": {
189189
"$ref": "#/definitions/meta"
@@ -287,28 +287,28 @@
287287
"first": {
288288
"description": "The first page of data",
289289
"oneOf": [
290-
{ "type": "string", "format": "uri" },
290+
{ "type": "string", "format": "uri-reference" },
291291
{ "type": "null" }
292292
]
293293
},
294294
"last": {
295295
"description": "The last page of data",
296296
"oneOf": [
297-
{ "type": "string", "format": "uri" },
297+
{ "type": "string", "format": "uri-reference" },
298298
{ "type": "null" }
299299
]
300300
},
301301
"prev": {
302302
"description": "The previous page of data",
303303
"oneOf": [
304-
{ "type": "string", "format": "uri" },
304+
{ "type": "string", "format": "uri-reference" },
305305
{ "type": "null" }
306306
]
307307
},
308308
"next": {
309309
"description": "The next page of data",
310310
"oneOf": [
311-
{ "type": "string", "format": "uri" },
311+
{ "type": "string", "format": "uri-reference" },
312312
{ "type": "null" }
313313
]
314314
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy