Skip to content

Commit 71ba715

Browse files
committed
Keep specific keywords out of general concerns
1 parent 07c7815 commit 71ba715

File tree

1 file changed

+15
-12
lines changed

1 file changed

+15
-12
lines changed

jsonschema-hyperschema.xml

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@
188188
Each of these requirements is covered in more detail in the individual keyword
189189
sections and keyword group overviews.
190190
</t>
191-
<section title="Link discovery">
191+
<section title="Link discovery and validity">
192192
<t>
193193
Before links can be used, they must be discovered. JSON Hyper-Schema provides
194194
for two ways to discover links: based on the location in the instance to which
@@ -201,14 +201,19 @@
201201
In both approaches, the relevant <xref target="base">"base"</xref>
202202
values MUST be included as described in that keyword's section.
203203
</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>
204210
<section title="By hyper-schema applicability">
205211
<t>
206212
An implementation MUST find and make the links in all applicable
207213
(sub)schemas available to clients. Schema applicability is defined
208214
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.
212217
</t>
213218
<t>
214219
These links MUST all be presented as a single set, regardless
@@ -250,10 +255,9 @@
250255
</t>
251256
<t>
252257
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.
257261
</t>
258262
<t>
259263
For both context and target URIs, this requirement includes
@@ -262,10 +266,9 @@
262266
</t>
263267
<t>
264268
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
269272
MAY offer a configuration option to enable or disable encapsulation.
270273
</t>
271274
</section>

0 commit comments

Comments
 (0)