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