Skip to content

updates schema to allow URI references #1169

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 12, 2017
Merged

Conversation

jelhan
Copy link
Contributor

@jelhan jelhan commented May 19, 2017

As discussed in #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.

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.
@bf4
Copy link
Contributor

bf4 commented May 19, 2017

FWIW, linking to comment that the JSON SCHEMA is not authoritative #440 (comment)

@jelhan jelhan mentioned this pull request Jun 12, 2017
@dgeb dgeb merged commit 44d512e into json-api:gh-pages Jun 12, 2017
@dgeb
Copy link
Member

dgeb commented Jun 12, 2017

Thank you @jelhan!

@bf4 Yep, the spec itself (not the schema) should be considered authoritative.

@bf4
Copy link
Contributor

bf4 commented Jun 13, 2017

@dgeb perhaps we should add a comment somewhere to that effect?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
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