|
188 | 188 | Each of these requirements is covered in more detail in the individual keyword
|
189 | 189 | sections and keyword group overviews.
|
190 | 190 | </t>
|
191 |
| - <section title="Link discovery"> |
| 191 | + <section title="Link discovery and validity"> |
192 | 192 | <t>
|
193 | 193 | Before links can be used, they must be discovered. JSON Hyper-Schema provides
|
194 | 194 | for two ways to discover links: based on the location in the instance to which
|
|
201 | 201 | In both approaches, the relevant <xref target="base">"base"</xref>
|
202 | 202 | values MUST be included as described in that keyword's section.
|
203 | 203 | </t>
|
| 204 | + <t> |
| 205 | + Note that not all discovered links will necessarily be valid for use with |
| 206 | + the specific instance at hand. Links may be unusable due to the contents |
| 207 | + of the instance or input, as described in the keywords controlling the |
| 208 | + link construction process. |
| 209 | + </t> |
204 | 210 | <section title="By hyper-schema applicability">
|
205 | 211 | <t>
|
206 | 212 | An implementation MUST find and make the links in all applicable
|
207 | 213 | (sub)schemas available to clients. Schema applicability is defined
|
208 | 214 | in <xref target="json-schema-validation">Section 10.1 of the JSON Schema
|
209 |
| - validation specification</xref>. Links that cannot fulfill |
210 |
| - their "templateRequired" keyword based on the instance and/or potential |
211 |
| - client input MUST be excluded. |
| 215 | + validation specification</xref>. Links that are not valid with the |
| 216 | + current instance and/or client input MUST be excluded. |
212 | 217 | </t>
|
213 | 218 | <t>
|
214 | 219 | These links MUST all be presented as a single set, regardless
|
|
250 | 255 | </t>
|
251 | 256 | <t>
|
252 | 257 | For a given link, an implementation MUST be able to construct the
|
253 |
| - target IRI or URI based on the instance and, if "hrefSchema" is present, |
254 |
| - client input. When working with client input, the input data MUST be |
255 |
| - pre-populated from the instance when a template variable matches instance |
256 |
| - data and is present in "hrefSchema". |
| 258 | + target IRI or URI based on the instance and/or client input. |
| 259 | + When working with client input, the input data MUST be pre-populated |
| 260 | + from the instance as controlled by the link construction keywords. |
257 | 261 | </t>
|
258 | 262 | <t>
|
259 | 263 | For both context and target URIs, this requirement includes
|
|
262 | 266 | </t>
|
263 | 267 | <t>
|
264 | 268 | In order to encourage treating context and target URIs as opaque
|
265 |
| - identifiers, implementations MAY opt to hide those fields that |
266 |
| - are only used in URI construction ("href", "templatePointers", |
267 |
| - "templateRequired", "anchor", and "anchorPointer") when making |
268 |
| - the remainder of the LDO available to clients. Implementations |
| 269 | + identifiers, implementations MAY opt to hide those keywords that |
| 270 | + are only used in URI construction when making the remainder of the |
| 271 | + Link Description Object available to clients. Implementations |
269 | 272 | MAY offer a configuration option to enable or disable encapsulation.
|
270 | 273 | </t>
|
271 | 274 | </section>
|
|
0 commit comments