Skip to content

Commit f787eac

Browse files
committed
meta start
1 parent 226141b commit f787eac

File tree

1 file changed

+38
-38
lines changed

1 file changed

+38
-38
lines changed

_format/1.1/index.md

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ A document **MUST** contain at least one of the following top-level members:
8484

8585
* `data`: the document's "primary data"
8686
* `errors`: an array of [error objects](#errors)
87-
* `meta`: a [meta object][meta] that contains non-standard
88-
meta-information.
87+
* `meta`: a [meta object][meta] that contains additional information about
88+
the document.
8989

9090
The members `data` and `errors` **MUST NOT** coexist in the same document.
9191

@@ -171,7 +171,7 @@ In addition, a resource object **MAY** contain any of these top-level members:
171171
* `relationships`: a [relationships object][relationships] describing relationships between
172172
the resource and other JSON API resources.
173173
* `links`: a [links object][links] containing links related to the resource.
174-
* `meta`: a [meta object][meta] containing non-standard meta-information about a
174+
* `meta`: a [meta object][meta] containing additional information about a
175175
resource that can not be represented as an attribute or relationship.
176176

177177
Here's how an article (i.e. a resource of type "articles") might appear in a document:
@@ -267,7 +267,7 @@ A "relationship object" **MUST** contain at least one of the following:
267267
(See [Fetching Relationships](#fetching-relationships).)
268268
* `related`: a [related resource link]
269269
* `data`: [resource linkage]
270-
* `meta`: a [meta object][meta] that contains non-standard meta-information about the
270+
* `meta`: a [meta object][meta] that contains additional information about the
271271
relationship.
272272

273273
A relationship object that represents a to-many relationship **MAY** also contain
@@ -371,8 +371,8 @@ resource.
371371

372372
A "resource identifier object" **MUST** contain `type` and `id` members.
373373

374-
A "resource identifier object" **MAY** also include a `meta` member, whose value is a [meta] object that
375-
contains non-standard meta-information.
374+
A "resource identifier object" **MAY** also include a `meta` member, whose value
375+
is a [meta] object.
376376

377377
### <a href="#document-compound-documents" id="document-compound-documents" class="headerlink"></a> Compound Documents
378378

@@ -486,8 +486,8 @@ multiple times.
486486
### <a href="#document-meta" id="document-meta" class="headerlink"></a> Meta Information
487487

488488
Where specified, a `meta` member can be used to include non-standard
489-
meta-information. The value of each `meta` member **MUST** be an object (a
490-
"meta object").
489+
meta-information or additional information associated with a [profile extension](#extending).
490+
The value of each `meta` member **MUST** be an object (a "meta object").
491491

492492
Any members **MAY** be specified within `meta` objects.
493493

@@ -521,8 +521,7 @@ Within this object, a link **MUST** be represented as either:
521521
* a string containing the link's URL.
522522
* <a id="document-links-link-object"></a>an object ("link object") which can contain the following members:
523523
* `href`: a string containing the link's URL.
524-
* `meta`: a meta object containing non-standard meta-information about the
525-
link.
524+
* `meta`: a [meta object][meta] containing additional information about the link.
526525

527526
Except for the `profile` key, each key present in a links object **MUST** have
528527
a single link as its value. The `profile` key, if present, **MUST** hold an
@@ -595,10 +594,14 @@ the URI `http://example.org/`:
595594

596595
A JSON API document **MAY** include information about its implementation
597596
under a top-level `jsonapi` member. If present, the value of the `jsonapi`
598-
member **MUST** be an object (a "jsonapi object"). The jsonapi object **MAY**
599-
contain a `version` member whose value is a string indicating the highest JSON
600-
API version supported. This object **MAY** also contain a `meta` member, whose
601-
value is a [meta] object that contains non-standard meta-information.
597+
member **MUST** be an object (a "jsonapi object").
598+
599+
The jsonapi object **MAY** contain a `version` member whose value is a string
600+
indicating the highest JSON API version supported.
601+
602+
This object **MAY** also contain a `meta` member, whose value is a [meta object][meta]
603+
that contains non-standard meta-information. The `meta` object in the jsonapi
604+
object **MAY NOT** contain [profile extension data](#extending-profile-extensions-applying).
602605

603606
```json
604607
{
@@ -1859,7 +1862,7 @@ them. When one or more profile extensions are used in a JSON API document:
18591862
2. The document **MUST** define an [alias][aliases] for each extension's URI.
18601863

18611864
The alias for an extension's URI **MAY** be used as a key (an "extension-associated
1862-
key"). The value at any such key is interpreted according the specification of
1865+
key") within a `meta` . The value at any such key is interpreted according the specification of
18631866
the extension to which the key name maps.
18641867

18651868
The same extension-associated key **MAY** appear more than once in a given
@@ -1868,12 +1871,10 @@ document.
18681871
An extension-associated key **MUST NOT** be added at any location where the
18691872
extension's specification does not define how to interpret the key's value.
18701873

1871-
> In practice, extension-associated keys are only allowed in a subset of the
1872-
places where a meta object can occur. This is because extensions are also
1873-
[limited](#extending-profile-extensions-characteristics) in where they can
1874-
permit their data to appear. In particular, extension-associated keys are
1875-
_not_ allowed anywhere within attributes objects or meta objects, or as keys
1876-
directly under `relationships` and `links` objects.
1874+
> In practice, extension-associated keys are only allowed as children of a
1875+
`"meta"` object, and only when that `"meta"` object is not within the
1876+
`"jsonapi"` object. This is because extensions are also [limited](#extending-profile-extensions-characteristics)
1877+
in where they can permit their data to appear.
18771878

18781879
The following document demonstrates these rules by adding a hypothetical
18791880
extension that has the URI `http://jsonapi.org/extensions/last-modified`:
@@ -1895,11 +1896,19 @@ extension that has the URI `http://jsonapi.org/extensions/last-modified`:
18951896
},
18961897
"relationships": {
18971898
"father": {
1898-
"data": { "type": "people", "id": "7" },
1899-
"last-modified": "2013-09-24T00:00:00Z"
1899+
"data": {
1900+
"type": "people", "id": "7"
1901+
},
1902+
"meta": {
1903+
"last-modified": "2013-09-24T00:00:00Z"
1904+
}
19001905
}
19011906
},
1902-
"last-modified": { "date": "2015-01-01T00:00:00Z", "fields": ["first-name"] }
1907+
"meta": {
1908+
"last-modified": {
1909+
"date": "2015-01-01T00:00:00Z", "fields": ["first-name"]
1910+
}
1911+
}
19031912
}
19041913
}
19051914
```
@@ -1996,14 +2005,10 @@ particular order relative to the other extensions in use.
19962005

19972006
A profile extension **MUST** only define a set of allowed values, and the
19982007
meaning of those values. These values **MAY** be defined for use in any
1999-
spec-defined object that allows a [meta object][meta], at the same level where
2000-
that meta object is allowed to appear. The one exception is that an extension
2001-
**MUST NOT** define values for use in the [`jsonapi` object](#document-jsonapi-object).
2002-
2003-
> Note: the above restriction implies that profile extensions may not define
2004-
values for use within the specification-defined `"attributes"`, `"meta"`, or
2005-
`"aliases"` objects, or as a key in a [`links` object][links], because meta
2006-
objects are not allowed in these places.
2008+
spec-defined [meta object][meta], with the exception is that an extension
2009+
**MUST NOT** define values for use in the [`jsonapi` object](#document-jsonapi-object)'s
2010+
meta object. A profile extension **MUST NOT** define any values for use outside
2011+
of a meta object.
20072012

20082013
The meaning of an extension-defined value **MAY** vary based on where it occurs
20092014
in the document but **MUST NOT** vary based on the presence or absence of other
@@ -2022,10 +2027,6 @@ in objects added to the document by other profile extensions.
20222027
The keys in any profile-extension-defined objects **MUST** only contain the
20232028
characters a-z (U+0061 to U+007A).
20242029

2025-
> Note: Future keys defined by this specification will also follow the above
2026-
restriction, gauranteeing that extension alias names are differentiable from
2027-
keys with a fixed meaning.
2028-
20292030
Profile extensions **MAY** be updated over time to add new capabilities, by
20302031
revising their registration. However, any such changes **MUST** be [backwards and
20312032
forwards compatible](http://www.w3.org/2001/tag/doc/versioning-compatibility-strategies#terminology).
@@ -2101,8 +2102,7 @@ An error object **MAY** have the following members:
21012102
(depending on which type of value is missing) that can be added to resolve
21022103
this error.
21032104

2104-
* `meta`: a [meta object][meta] containing non-standard meta-information about the
2105-
error.
2105+
* `meta`: a [meta object][meta] containing additional information about the error.
21062106

21072107
> Note: Previous versions of this specification defined a `code` member in
21082108
error objects. The role of that member is now played instead by the `type`

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