Skip to content

Commit 9d36434

Browse files
committed
Remove profile aliasing
1 parent 969d75a commit 9d36434

File tree

1 file changed

+9
-54
lines changed

1 file changed

+9
-54
lines changed

_format/1.1/index.md

Lines changed: 9 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -559,22 +559,15 @@ related resource collection:
559559
#### <a href="#profile-links" id="profile-links" class="headerlink"></a> Profile Links
560560

561561
Like all [links][link], a link in an array of `profile` links can be represented
562-
with a [link object]. In that case, the link object **MAY** contain an `aliases`
563-
member listing any [profile aliases].
562+
with a [link object].
564563

565-
Here, the `profile` key specifies an array of `profile` links, including one
566-
that includes a [profile alias][profile aliases]:
564+
Here, the `profile` key specifies an array of `profile` links:
567565

568566
```json
569567
"links": {
570568
"profile": [
571569
"http://example.com/profiles/flexible-pagination",
572-
{
573-
"href": "http://example.com/profiles/resource-versioning",
574-
"aliases": {
575-
"version": "v"
576-
}
577-
}
570+
"http://example.com/profiles/resource-versioning"
578571
]
579572
}
580573
```
@@ -2025,19 +2018,18 @@ https://example.com/?page[cursor]=xyz&profile=https://example.com/pagination-pro
20252018
```
20262019

20272020

2028-
### <a href="#profile-keywords-and-aliases" id="profile-keywords-and-aliases" class="headerlink"></a> Profile Keywords and Aliases
2021+
### <a href="#profile-keywords" id="profile-keywords" class="headerlink"></a> Profile Keywords
20292022

20302023
A profile **SHOULD** explicitly declare "keywords" for any elements that it
20312024
introduces to the document structure. If a profile does not explicitly declare a
20322025
keyword for an element, then the name of the element itself (i.e., its key in
20332026
the document) is considered to be its keyword. All profile keywords **MUST**
20342027
meet this specification's requirements for [member names].
20352028

2036-
For the purposes of aliasing, a profile's elements are defined shallowly.
20372029
In other words, if a profile introduces an object-valued document member, that
2038-
member is an element (and so subject to aliasing), but any keys in it are not
2039-
themselves elements. Likewise, if the profile defines an array-valued element,
2040-
the keys in nested objects within that array are not elements.
2030+
member is an element, but any keys in it are not themselves elements. Likewise,
2031+
if the profile defines an array-valued element, the keys in nested objects
2032+
within that array are not elements.
20412033

20422034
The following example profile defines a single keyword, `version`:
20432035

@@ -2085,42 +2077,6 @@ This profile might be applied as follows:
20852077
}
20862078
```
20872079

2088-
Documents that apply a particular profile **MAY** represent each keyword with an
2089-
alternatively named member, or "alias". An alias fully assumes any meaning
2090-
specified for a keyword, which no longer retains that meaning. Any aliases
2091-
associated with a profile **MUST** be represented in the profile's corresponding
2092-
`aliases` object within its [link object][links]. The key of each alias **MUST**
2093-
be a keyword from the profile, and the value **MUST** be an alias that applies
2094-
to this particular representation. This aliasing mechanism allows profiles to be
2095-
applied in a way that is both consistent with the rest of the representation and
2096-
does not conflict with other profiles.
2097-
2098-
For instance, the following document provides an alias for `version`: `v`.
2099-
Interpreters of this representation should treat the key `v` as if it were the
2100-
key `version` described in the profile:
2101-
2102-
```json
2103-
{
2104-
"data": {
2105-
"type": "contacts",
2106-
"id": "345",
2107-
"meta": {
2108-
"v": "2018-04-14-879976658"
2109-
},
2110-
"attributes": {
2111-
"name": "Ethan"
2112-
}
2113-
},
2114-
"links": {
2115-
"profile": [{
2116-
"href": "http://example.com/profiles/resource-versioning",
2117-
"aliases": {
2118-
"version": "v"
2119-
}
2120-
}]
2121-
}
2122-
}
2123-
```
21242080

21252081
### <a href="#profiles-processing" id="profiles-processing" class="headerlink"></a> Processing Profiled Documents/Requests
21262082

@@ -2284,8 +2240,7 @@ that "The elements... specified by a profile... **MUST NOT** change over time."
22842240

22852241
> The practical issue with adding a sibling element is that another profile
22862242
> in use on the document might already define a sibling element of the same
2287-
> name, and existing documents would not have any aliases defined to resolve
2288-
> this conflict.
2243+
> name.
22892244
22902245
However, the timestamps profile could evolve to allow other optional members,
22912246
such as `deleted`, in the `timestamps` object. This is possible because the
@@ -2432,7 +2387,7 @@ request as equivalent to one in which the square brackets were percent-encoded.
24322387
[link object]: #document-links-link-object
24332388
[profiles]: #profiles
24342389
[timestamps profile]: #profiles-timestamp-profile
2435-
[profile aliases]: #profile-keywords-and-aliases
2390+
[profile keywords]: #profile-keywords
24362391
[error details]: #errors
24372392
[error object]: #error-objects
24382393
[error objects]: #errror-objects

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