Skip to content

Commit ed9bdf8

Browse files
authored
Merge pull request #769 from handrews/appl-annot
Clarify annotation collection with applicators
2 parents 8e75f7e + 69b313c commit ed9bdf8

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

jsonschema-core.xml

+11-11
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,10 @@
654654
<t>
655655
Evaluation of a parent schema object can complete once all of its
656656
subschemas have been evaluated, although in some circumstances evaluation
657-
may be short-circuited due to assertion results.
657+
may be short-circuited due to assertion results. When annotations are
658+
being collected, some assertion result short-circuiting is not possible
659+
due to the need to examine all subschemas for annotation collection, including
660+
those that cannot further change the assertion result.
658661
</t>
659662
<section title="Keyword Interactions">
660663
<t>
@@ -1981,6 +1984,9 @@
19811984
<t>
19821985
An instance validates successfully against this keyword if it validates
19831986
successfully against at least one schema defined by this keyword's value.
1987+
Note that when annotations are being collected, all subschemas MUST
1988+
be examined so that annotations are collected from each subschema
1989+
that validates successfully.
19841990
</t>
19851991
</section>
19861992

@@ -2245,16 +2251,10 @@
22452251
</t>
22462252
<t>
22472253
An array instance is valid against "contains" if at least one of
2248-
its elements is valid against the given schema. This keyword
2249-
does not produce annotation results.
2250-
<cref>
2251-
Should it produce a set of the indices for which the
2252-
array element is valid against the subschema? "contains"
2253-
does not affect "additionalItems" or any other current
2254-
or proposed keyword, but the information could be useful,
2255-
and implementation that collect annotations need to
2256-
apply "contains" to every element anyway.
2257-
</cref>
2254+
its elements is valid against the given schema. Note that when
2255+
collecting annotations, the subschema MUST be applied to every
2256+
array element even after the first match has been found. This
2257+
is to ensure that all possible annotations are collected.
22582258
</t>
22592259
</section>
22602260
</section>

jsonschema-validation.xml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1229,9 +1229,9 @@
12291229
their results, without asserting any conditions of their own.
12301230
Without assertion keywords, these applicators can only cause assertion
12311231
failures by using the false boolean schema, or by inverting the result
1232-
of the true boolean schema. For this reason, they are better defined
1233-
as a generic mechanism on which validation, hyper-schema, and extension
1234-
vocabularies can all be based
1232+
of the true boolean schema (or equivalent schema objects).
1233+
For this reason, they are better defined as a generic mechanism on which
1234+
validation, hyper-schema, and extension vocabularies can all be based.
12351235
</t>
12361236
<t hangText='"dependencies"'>
12371237
This keyword had two different modes of behavior, which made it

0 commit comments

Comments
 (0)