Skip to content

Reintroduce 'related resource URL' #654

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

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions format/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -271,14 +271,27 @@ which **MUST** contain at least one of the following:
"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.
* A `"related"` member, whose value is a related resource URL, as defined above.
* A `"related"` member, whose value is a related resource URL, as defined below.
* A `"data"` member, whose value represents "resource linkage" (defined below).
* A `"meta"` member that contains non-standard meta-information about the
relationship.

A relationship object that represents a to-many relationship **MAY** also contain
pagination links under the `"links"` member, as described below.

A "related resource URL" provides access to the resources targeted by the
relationship. When fetched, it returns the related resource object(s) as the
response's primary data. For example, an `article`'s `comments` relationship
could specify a URL that returns a list of comment resource objects when
retrieved through a `GET` request.

A related resource URL **MUST** remain constant even when the relationship (the
set of referenced resources) mutates. That is, the response from a related
resource URL always reflects the current state of the relationship.

If present, a related resource URL **MUST** be a valid URL, even if the
relationship isn't currently associated with any target resources.

Resource linkage **MUST** be represented as one of the following:

* `null` for empty to-one relationships.
Expand All @@ -290,9 +303,6 @@ Resource linkage **MUST** be represented as one of the following:
together all of the included resource objects without having to `GET` any
relationship URLs.

If present, a *related resource URL* **MUST** be a valid URL, even if the
relationship isn't currently associated with any target resources.

> Note: The spec does not impart meaning to order of resource identifier
objects in linkage arrays of to-many relationships, although implementations
may do that. Arrays of resource identifier objects may represent ordered
Expand Down
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