Skip to content

Commit 4d944fb

Browse files
committed
Reintroduce 'related resource URL'
1 parent dc5d337 commit 4d944fb

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

format/index.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -269,14 +269,27 @@ which **MUST** contain at least one of the following:
269269
"relationship URL"). This URL allows the client to directly manipulate the
270270
relationship. For example, it would allow a client to remove an `author`
271271
from an `article` without deleting the `people` resource itself.
272-
* A `"related"` member, whose value is a related resource URL, as defined above.
272+
* A `"related"` member, whose value is a related resource URL, as defined below.
273273
* A `"data"` member, whose value represents "resource linkage" (defined below).
274274
* A `"meta"` member that contains non-standard meta-information about the
275275
relationship.
276276

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

280+
A "related resource URL" provides access to the resources targeted by the
281+
relationship. When fetched, it returns the related resource object(s) as the
282+
response's primary data. For example, an `article`'s `comments` relationship
283+
could specify a URL that returns a list of comment resource objects when
284+
retrieved through a `GET` request.
285+
286+
A related resource URL **MUST** remain constant even when the relationship (the
287+
set of referenced resources) mutates. That is, the response from a related
288+
resource URL always reflects the current state of the relationship.
289+
290+
If present, a related resource URL **MUST** be a valid URL, even if the
291+
relationship isn't currently associated with any target resources.
292+
280293
Resource linkage **MUST** be represented as one of the following:
281294

282295
* `null` for empty to-one relationships.
@@ -288,9 +301,6 @@ Resource linkage **MUST** be represented as one of the following:
288301
together all of the included resource objects without having to `GET` any
289302
relationship URLs.
290303

291-
If present, a *related resource URL* **MUST** be a valid URL, even if the
292-
relationship isn't currently associated with any target resources.
293-
294304
For example, the following article is associated with an `author`:
295305

296306
```javascript

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