Skip to content

Commit 08da2d1

Browse files
authored
Merge pull request #986 from handrews/mult-annot
Remove special case handling of annotation values
2 parents dc9e8a8 + efe6664 commit 08da2d1

File tree

1 file changed

+8
-17
lines changed

1 file changed

+8
-17
lines changed

jsonschema-core.xml

+8-17
Original file line numberDiff line numberDiff line change
@@ -775,7 +775,9 @@
775775
</t>
776776
<t>
777777
<xref target="annotations">Annotation</xref> results are
778-
combined according to the rules specified by each annotation keyword.
778+
preserved along with the instance location and the location of
779+
the schema keyword, so that applications can decide how to
780+
interpret multiple values.
779781
</t>
780782
<section title="Referenced and Referencing Schemas" anchor="referenced">
781783
<t>
@@ -870,8 +872,9 @@
870872
<t>
871873
Annotations are attached to specific locations in an instance.
872874
Since many subschemas can be applied to any single
873-
location, annotation keywords need to specify any unusual handling of
874-
multiple applicable occurrences of the keyword with different values.
875+
location, applications may need to decide how to handle differing
876+
annotation values being attached to the same instance location by
877+
the same schema keyword in different schema objects.
875878
</t>
876879
<t>
877880
Unlike assertion results, annotation data can take a wide variety of forms,
@@ -924,14 +927,6 @@
924927
</t>
925928
</list>
926929
</t>
927-
<t>
928-
If the same keyword attaches values from multiple schema locations
929-
to the same instance location, and the annotation defines a process
930-
for combining such values, then the combined value MUST also be associated
931-
with the instance location. The <xref target="output">output formats</xref>
932-
described in this specification that include annotation information
933-
meet this requirement.
934-
</t>
935930
<section title="Distinguishing Among Multiple Values">
936931
<t>
937932
Applications MAY make decisions on which of multiple annotation values
@@ -991,8 +986,7 @@
991986
<t>
992987
In this example, both Feature A and Feature B make use of the re-usable
993988
"enabledToggle" schema. That schema uses the "title", "description",
994-
and "default" annotations, none of which define special behavior for
995-
handling multiple values. Therefore the application has to decide how
989+
and "default" annotations. Therefore the application has to decide how
996990
to handle the additional "default" value for Feature A, and the additional
997991
"description" value for Feature B.
998992
</t>
@@ -1066,10 +1060,7 @@
10661060
<t>
10671061
In addition to possibly defining annotation results of their own,
10681062
applicator keywords aggregate the annotations collected in their
1069-
subschema(s) or referenced schema(s). The rules for aggregating
1070-
annotation values are defined by each annotation keyword, and are
1071-
not directly affected by the logic used for combining assertion
1072-
results.
1063+
subschema(s) or referenced schema(s).
10731064
</t>
10741065
</section>
10751066
</section>

0 commit comments

Comments
 (0)