-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhal.schema.json
282 lines (282 loc) · 23.1 KB
/
hal.schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
{
"meta:license": [
"Copyright 2018 Adobe Systems Incorporated. All rights reserved.",
"This work is licensed under a Creative Commons Attribution 4.0 International (CC BY 4.0) license",
"you may not use this file except in compliance with the License. You may obtain a copy",
"of the License at https://creativecommons.org/licenses/by/4.0/"
],
"$id": "https://ns.adobe.com/xdm/external/hal/resource",
"$schema": "http://json-schema.org/draft-06/schema#",
"title": "HAL Resource",
"description": "",
"type": "object",
"definitions": {
"hal": {
"properties": {
"_links": {
"type": "object",
"additionalProperties": false,
"meta:keys": {
"about": "Refers to a resource that is the subject of the link's context.",
"alternate": "Refers to a substitute for this context",
"appendix": "Refers to an appendix.",
"archives": "Refers to a collection of records, documents, or other materials of historical interest.",
"author": "Refers to the context's author.",
"blocked-by": "Identifies the entity that blocks access to a resource following receipt of a legal demand.",
"bookmark": "Gives a permanent link to use for bookmarking purposes.",
"canonical": "Designates the preferred version of a resource (the IRI and its contents).",
"chapter": "Refers to a chapter in a collection of resources.",
"cite-as": "Indicates that the link target is preferred over the link context for the purpose of referencing.",
"collection": "The target IRI points to a resource which represents the collection resource for the context IRI.",
"contents": "Refers to a table of contents.",
"convertedFrom": "The document linked to was later converted to the document that contains this link relation. For example, an RFC can have a link to the Internet-Draft that became the RFC; in that case, the link relation would be `convertedFrom`.",
"copyright": "Refers to a copyright statement that applies to the link's context.",
"create-form": "The target IRI points to a resource where a submission form can be obtained.",
"current": "Refers to a resource containing the most recent item(s) in a collection of resources.",
"describedby": "Refers to a resource providing information about the link's context.",
"describes": "The relationship A 'describes' B asserts that resource A provides a description of resource B. There are no constraints on the format or representation of either A or B, neither are there any further constraints on either resource.",
"disclosure": "Refers to a list of patent disclosures made with respect to material for which 'disclosure' relation is specified.",
"dns-prefetch": "Used to indicate an origin that will be used to fetch required resources for the link context, and that the user agent ought to resolve as early as possible.",
"duplicate": "Refers to a resource whose available representations are byte-for-byte identical with the corresponding representations of the context IRI.",
"edit": "Refers to a resource that can be used to edit the link's context.",
"edit-form": "The target IRI points to a resource where a submission form for editing associated resource can be obtained.",
"edit-media": "Refers to a resource that can be used to edit media associated with the link's context.",
"enclosure": "Identifies a related resource that is potentially large and might require special handling.",
"first": "An IRI that refers to the furthest preceding resource in a series of resources.",
"glossary": "Refers to a glossary of terms.",
"help": "Refers to context-sensitive help.",
"hosts": "Refers to a resource hosted by the server indicated by the link context.",
"hub": "Refers to a hub that enables registration for notification of updates to the context.",
"icon": "Refers to an icon representing the link's context.",
"index": "Refers to an index.",
"item": "The target IRI points to a resource that is a member of the collection represented by the context IRI.",
"last": "An IRI that refers to the furthest following resource in a series of resources.",
"latest-version": "Points to a resource containing the latest (e.g., current) version of the context.",
"license": "Refers to a license associated with this context.",
"lrdd": "Refers to further information about the link's context, expressed as a LRDD (\"Link-based Resource Descriptor Document\") resource. See [RFC6415] for information about processing this relation type in host-meta documents. When used elsewhere, it refers to additional links and other metadata. Multiple instances indicate additional LRDD resources. LRDD resources MUST have an `application/xrd+xml` representation, and MAY have others.",
"memento": "The Target IRI points to a Memento, a fixed resource that will not change state anymore.",
"monitor": "Refers to a resource that can be used to monitor changes in an HTTP resource.",
"monitor-group": "Refers to a resource that can be used to monitor changes in a specified group of HTTP resources.",
"next": "Indicates that the link's context is a part of a series, and that the next in the series is the link target.",
"next-archive": "Refers to the immediately following archive resource.",
"nofollow": "Indicates that the context’s original author or publisher does not endorse the link target.",
"noreferrer": "Indicates that no referrer information is to be leaked when following the link.",
"original": "The Target IRI points to an Original Resource.",
"payment": "Indicates a resource where payment is accepted.",
"pingback": "Gives the address of the pingback resource for the link context.",
"preconnect": "Used to indicate an origin that will be used to fetch required resources for the link context. Initiating an early connection, which includes the DNS lookup, TCP handshake, and optional TLS negotiation, allows the user agent to mask the high latency costs of establishing a connection.",
"predecessor-version": "Points to a resource containing the predecessor version in the version history.",
"prefetch": "The prefetch link relation type is used to identify a resource that might be required by the next navigation from the link context, and that the user agent ought to fetch, such that the user agent can deliver a faster response once the resource is requested in the future.",
"preload": "Refers to a resource that should be loaded early in the processing of the link's context, without blocking rendering.",
"prerender": "Used to identify a resource that might be required by the next navigation from the link context, and that the user agent ought to fetch and execute, such that the user agent can deliver a faster response once the resource is requested in the future.",
"prev": "Indicates that the link's context is a part of a series, and that the previous in the series is the link target.",
"preview": "Refers to a resource that provides a preview of the link's context.",
"previous": "Refers to the previous resource in an ordered series of resources. Synonym for `prev`.",
"prev-archive": "Refers to the immediately preceding archive resource.",
"privacy-policy": "Refers to a privacy policy associated with the link's context.",
"profile": "Identifying that a resource representation conforms to a certain profile, without affecting the non-profile semantics of the resource representation.",
"related": "Identifies a related resource.",
"restconf": "Identifies the root of RESTCONF API as configured on this HTTP server. The `restconf` relation defines the root of the API defined in RFC8040. Subsequent revisions of RESTCONF will use alternate relation values to support protocol versioning.",
"replies": "Identifies a resource that is a reply to the context of the link.",
"search": "Refers to a resource that can be used to search through the link's context and related resources.",
"section": "Refers to a section in a collection of resources.",
"self": "Conveys an identifier for the link's context.",
"service": "Indicates a URI that can be used to retrieve a service document.",
"start": "Refers to the first resource in a collection of resources.",
"stylesheet": "Refers to a stylesheet.",
"subsection": "Refers to a resource serving as a subsection in a collection of resources.",
"successor-version": "Points to a resource containing the successor version in the version history.",
"tag": "Gives a tag (identified by the given address) that applies to the current document.",
"terms-of-service": "Refers to the terms of service associated with the link's context.",
"timegate": "The Target IRI points to a TimeGate for an Original Resource.",
"timemap": "The Target IRI points to a TimeMap for an Original Resource.",
"type": "Refers to a resource identifying the abstract semantic type of which the link's context is considered to be an instance.",
"up": "Refers to a parent document in a hierarchy of documents.",
"version-history": "Points to a resource containing the version history for the context.",
"via": "Identifies a resource that is the source of the information in the link's context.",
"webmention": "Identifies a target URI that supports the Webmention protcol. This allows clients that mention a resource in some form of publishing process to contact that endpoint and inform it that this resource has been mentioned.",
"working-copy": "Points to a working copy for this resource.",
"working-copy-of": "Points to the versioned resource from which this working copy was obtained."
},
"patternProperties": {
"^[a-z]+[a-z0-9\\.-]*$": {
"anyOf": [
{
"$ref": "https://ns.adobe.com/xdm/external/hal/link"
},
{
"type": "array",
"minItems": 1,
"items": {
"$ref": "https://ns.adobe.com/xdm/external/hal/link"
}
}
]
},
"^.*://.*$": {
"anyOf": [
{
"$ref": "https://ns.adobe.com/xdm/external/hal/link"
},
{
"type": "array",
"minItems": 1,
"items": {
"$ref": "https://ns.adobe.com/xdm/external/hal/link"
}
}
]
}
},
"description": "It is an object whose property names are link relation types (as defined by [RFC5988](https://tools.ietf.org/html/rfc5988) and values are either a Link Object or an array of Link Objects. The subject resource of these links is the Resource Object of which the containing `_links` object is a property."
},
"_embedded": {
"type": "object",
"additionalProperties": false,
"meta:keys": {
"about": "Refers to a resource that is the subject of the link's context.",
"alternate": "Refers to a substitute for this context",
"appendix": "Refers to an appendix.",
"archives": "Refers to a collection of records, documents, or other materials of historical interest.",
"author": "Refers to the context's author.",
"blocked-by": "Identifies the entity that blocks access to a resource following receipt of a legal demand.",
"bookmark": "Gives a permanent link to use for bookmarking purposes.",
"canonical": "Designates the preferred version of a resource (the IRI and its contents).",
"chapter": "Refers to a chapter in a collection of resources.",
"cite-as": "Indicates that the link target is preferred over the link context for the purpose of referencing.",
"collection": "The target IRI points to a resource which represents the collection resource for the context IRI.",
"contents": "Refers to a table of contents.",
"convertedFrom": "The document linked to was later converted to the document that contains this link relation. For example, an RFC can have a link to the Internet-Draft that became the RFC; in that case, the link relation would be `convertedFrom`.",
"copyright": "Refers to a copyright statement that applies to the link's context.",
"create-form": "The target IRI points to a resource where a submission form can be obtained.",
"current": "Refers to a resource containing the most recent item(s) in a collection of resources.",
"describedby": "Refers to a resource providing information about the link's context.",
"describes": "The relationship A 'describes' B asserts that resource A provides a description of resource B. There are no constraints on the format or representation of either A or B, neither are there any further constraints on either resource.",
"disclosure": "Refers to a list of patent disclosures made with respect to material for which 'disclosure' relation is specified.",
"dns-prefetch": "Used to indicate an origin that will be used to fetch required resources for the link context, and that the user agent ought to resolve as early as possible.",
"duplicate": "Refers to a resource whose available representations are byte-for-byte identical with the corresponding representations of the context IRI.",
"edit": "Refers to a resource that can be used to edit the link's context.",
"edit-form": "The target IRI points to a resource where a submission form for editing associated resource can be obtained.",
"edit-media": "Refers to a resource that can be used to edit media associated with the link's context.",
"enclosure": "Identifies a related resource that is potentially large and might require special handling.",
"first": "An IRI that refers to the furthest preceding resource in a series of resources.",
"glossary": "Refers to a glossary of terms.",
"help": "Refers to context-sensitive help.",
"hosts": "Refers to a resource hosted by the server indicated by the link context.",
"hub": "Refers to a hub that enables registration for notification of updates to the context.",
"icon": "Refers to an icon representing the link's context.",
"index": "Refers to an index.",
"item": "The target IRI points to a resource that is a member of the collection represented by the context IRI.",
"last": "An IRI that refers to the furthest following resource in a series of resources.",
"latest-version": "Points to a resource containing the latest (e.g., current) version of the context.",
"license": "Refers to a license associated with this context.",
"lrdd": "Refers to further information about the link's context, expressed as a LRDD (\"Link-based Resource Descriptor Document\") resource. See [RFC6415] for information about processing this relation type in host-meta documents. When used elsewhere, it refers to additional links and other metadata. Multiple instances indicate additional LRDD resources. LRDD resources MUST have an `application/xrd+xml` representation, and MAY have others.",
"memento": "The Target IRI points to a Memento, a fixed resource that will not change state anymore.",
"monitor": "Refers to a resource that can be used to monitor changes in an HTTP resource.",
"monitor-group": "Refers to a resource that can be used to monitor changes in a specified group of HTTP resources.",
"next": "Indicates that the link's context is a part of a series, and that the next in the series is the link target.",
"next-archive": "Refers to the immediately following archive resource.",
"nofollow": "Indicates that the context’s original author or publisher does not endorse the link target.",
"noreferrer": "Indicates that no referrer information is to be leaked when following the link.",
"original": "The Target IRI points to an Original Resource.",
"payment": "Indicates a resource where payment is accepted.",
"pingback": "Gives the address of the pingback resource for the link context.",
"preconnect": "Used to indicate an origin that will be used to fetch required resources for the link context. Initiating an early connection, which includes the DNS lookup, TCP handshake, and optional TLS negotiation, allows the user agent to mask the high latency costs of establishing a connection.",
"predecessor-version": "Points to a resource containing the predecessor version in the version history.",
"prefetch": "The prefetch link relation type is used to identify a resource that might be required by the next navigation from the link context, and that the user agent ought to fetch, such that the user agent can deliver a faster response once the resource is requested in the future.",
"preload": "Refers to a resource that should be loaded early in the processing of the link's context, without blocking rendering.",
"prerender": "Used to identify a resource that might be required by the next navigation from the link context, and that the user agent ought to fetch and execute, such that the user agent can deliver a faster response once the resource is requested in the future.",
"prev": "Indicates that the link's context is a part of a series, and that the previous in the series is the link target.",
"preview": "Refers to a resource that provides a preview of the link's context.",
"previous": "Refers to the previous resource in an ordered series of resources. Synonym for `prev`.",
"prev-archive": "Refers to the immediately preceding archive resource.",
"privacy-policy": "Refers to a privacy policy associated with the link's context.",
"profile": "Identifying that a resource representation conforms to a certain profile, without affecting the non-profile semantics of the resource representation.",
"related": "Identifies a related resource.",
"restconf": "Identifies the root of RESTCONF API as configured on this HTTP server. The `restconf` relation defines the root of the API defined in RFC8040. Subsequent revisions of RESTCONF will use alternate relation values to support protocol versioning.",
"replies": "Identifies a resource that is a reply to the context of the link.",
"search": "Refers to a resource that can be used to search through the link's context and related resources.",
"section": "Refers to a section in a collection of resources.",
"self": "Conveys an identifier for the link's context.",
"service": "Indicates a URI that can be used to retrieve a service document.",
"start": "Refers to the first resource in a collection of resources.",
"stylesheet": "Refers to a stylesheet.",
"subsection": "Refers to a resource serving as a subsection in a collection of resources.",
"successor-version": "Points to a resource containing the successor version in the version history.",
"tag": "Gives a tag (identified by the given address) that applies to the current document.",
"terms-of-service": "Refers to the terms of service associated with the link's context.",
"timegate": "The Target IRI points to a TimeGate for an Original Resource.",
"timemap": "The Target IRI points to a TimeMap for an Original Resource.",
"type": "Refers to a resource identifying the abstract semantic type of which the link's context is considered to be an instance.",
"up": "Refers to a parent document in a hierarchy of documents.",
"version-history": "Points to a resource containing the version history for the context.",
"via": "Identifies a resource that is the source of the information in the link's context.",
"webmention": "Identifies a target URI that supports the Webmention protcol. This allows clients that mention a resource in some form of publishing process to contact that endpoint and inform it that this resource has been mentioned.",
"working-copy": "Points to a working copy for this resource.",
"working-copy-of": "Points to the versioned resource from which this working copy was obtained."
},
"patternProperties": {
"^[a-z]+[a-z0-9\\.-]*$": {
"anyOf": [
{
"$ref": "https://ns.adobe.com/xdm/external/hal/link"
},
{
"type": "array",
"minItems": 1,
"items": {
"$ref": "https://ns.adobe.com/xdm/external/hal/link"
}
},
{
"type": "object",
"description": "`_embedded` can contain any object or resource."
},
{
"type": "array",
"items": {
"type": "object",
"description": "`_embedded` can contain any object or resource."
}
}
]
},
"^.*://.*$": {
"anyOf": [
{
"$ref": "https://ns.adobe.com/xdm/external/hal/link"
},
{
"type": "array",
"minItems": 1,
"items": {
"$ref": "https://ns.adobe.com/xdm/external/hal/link"
}
},
{
"type": "object",
"description": "`_embedded` can contain any object or resource."
},
{
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"description": "`_embedded` can contain any object or resource."
}
}
]
}
},
"description": "It is an object whose property names are link relation types (as defined by [RFC5988](https://tools.ietf.org/html/rfc5988)) and values are either a Resource Object or an array of Resource Objects.\\n\\nEmbedded Resources MAY be a full, partial, or inconsistent version of the representation served from the target URI."
}
}
}
},
"allOf": [
{
"$ref": "#/definitions/hal"
}
],
"meta:status": "experimental"
}