@@ -1910,28 +1910,23 @@ Link: <https://api.example.com/trees/1/nodes/456> rev=up
1910
1910
collections also often provide a way to create individual item resources with
1911
1911
server-assigned identifiers.
1912
1912
</t >
1913
- <t >
1914
- This schema describes a collection where each item representation is
1915
- identical to the individual resource item representation, and there
1916
- is enough metadata included in the collection representation to
1917
- produce pagination links. The "first" and "last" pagination links
1918
- were omitted as this is already a long example.
1919
- </t >
1920
- <t >
1921
- Note that there is an object member called "items", which is an array
1922
- and therefore uses the validation keyword "items" in its own schema.
1923
- The outer "items" is a property name, the inner one is a schema keyword.
1924
- </t >
1925
1913
<figure >
1914
+ <preamble >
1915
+ This schema describes a collection where each item representation is
1916
+ identical to the individual resource item representation, and there
1917
+ is enough metadata included in the collection representation to
1918
+ produce pagination links. The "first" and "last" pagination links
1919
+ were omitted as this is already a long example.
1920
+ </preamble >
1926
1921
<artwork >
1927
1922
<![CDATA[ {
1928
1923
"$id": "https://schema.example.com/thing-collection",
1929
1924
"$schema": "http://json-schema.org/draft-07-wip/hyper-schema#",
1930
1925
"base": "https://api.example.com",
1931
1926
"type": "object",
1932
- "required": ["items "],
1927
+ "required": ["elements "],
1933
1928
"properties": {
1934
- "items ": {
1929
+ "elements ": {
1935
1930
"type": "array",
1936
1931
"items": {
1937
1932
"allOf": [{"$ref": "thing#"}],
@@ -2019,7 +2014,7 @@ Link: <https://api.example.com/trees/1/nodes/456> rev=up
2019
2014
<figure >
2020
2015
<artwork >
2021
2016
<![CDATA[ {
2022
- "items ": [
2017
+ "elements ": [
2023
2018
{"id": 12345, "data": {}},
2024
2019
{"id": 67890, "data": {}}
2025
2020
],
@@ -2069,28 +2064,28 @@ Link: <https://api.example.com/trees/1/nodes/456> rev=up
2069
2064
"contextPointer": "",
2070
2065
"rel": "item",
2071
2066
"targetUri": "https://api.example.com/things/1234",
2072
- "attachmentPointer": "/items /0"
2067
+ "attachmentPointer": "/elements /0"
2073
2068
},
2074
2069
{
2075
2070
"contextUri": "https://api.example.com/things",
2076
2071
"contextPointer": "",
2077
2072
"rel": "item",
2078
2073
"targetUri": "https://api.example.com/things/67890",
2079
- "attachmentPointer": "/items /1"
2074
+ "attachmentPointer": "/elements /1"
2080
2075
},
2081
2076
{
2082
2077
"contextUri": "https://api.example.com/things",
2083
- "contextPointer": "/items /0",
2078
+ "contextPointer": "/elements /0",
2084
2079
"rel": "self",
2085
2080
"targetUri": "https://api.example.com/things/1234",
2086
- "attachmentPointer": "/items /0"
2081
+ "attachmentPointer": "/elements /0"
2087
2082
},
2088
2083
{
2089
2084
"contextUri": "https://api.example.com/things",
2090
- "contextPointer": "/items /1",
2085
+ "contextPointer": "/elements /1",
2091
2086
"rel": "self",
2092
2087
"targetUri": "https://api.example.com/things/67890",
2093
- "attachmentPointer": "/items /1"
2088
+ "attachmentPointer": "/elements /1"
2094
2089
}
2095
2090
]]]>
2096
2091
0 commit comments