Skip to content

Commit 052ef06

Browse files
committed
Update applicator vocabulary description
The prior commits just moved this text over, this commit updates the text to make sense for the new location and structure. In particular, this removes the focus on validation as the applicator vocabulary is more fundamental.
1 parent b28bd39 commit 052ef06

File tree

1 file changed

+31
-25
lines changed

1 file changed

+31
-25
lines changed

jsonschema-core.xml

Lines changed: 31 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -973,38 +973,27 @@
973973

974974
<section title="A Vocabulary for Applying Subschemas">
975975
<t>
976-
Validation begins by applying the root schema to the complete instance
977-
document. From there, various keywords are used to determine which additional
978-
subschemas are applied to either the current location, or a child location.
979-
These keywords also define whether and how subschema assertion results are
980-
modified and/or combined. Such keywords do not assert conditions on their
981-
own. Rather, they control how assertions are applied and evaluated.
976+
Evaluation of an instance against a schema begins by applying the root schema
977+
to the complete instance document. From there, various keywords are used
978+
to determine which additional subschemas are applied to either the current
979+
location, or a child location. These keywords also define how subschema
980+
assertion results are modified and/or combined. Annotation results are
981+
combined according to the rules specified by each annotation keyword.
982982
</t>
983983
<t>
984-
The keywords in the <xref target="logic">boolean logic</xref> and
985-
<xref target="conditional">conditional</xref> sections of this specification
986-
apply subschemas to the same location as the parent schema. The former group
987-
defines boolean operations on the subschema assertion results, while the
988-
latter evaluates one subschema and uses its assertion results to determine
989-
which of two other subschemas to apply as well.
990-
</t>
991-
<t>
992-
Several keywords determine which subschemas are applied to array items,
993-
object property values, and object property names. They are:
994-
"items", "additionalItems", "contains", "properties", "patternProperties",
995-
"additionalProperties", and "propertyNames". The "contains" keyword only
996-
requires its subschema to be valid against at least one child instance, while
997-
the other keywords require that all subschemas are valid against all child
998-
instances to which they apply.
984+
Keyword that apply subschemas are called applicators, and do not assert
985+
conditions on their own. Rather, they control how assertions are applied
986+
and evaluated. This section defines a set of applicator keywords that
987+
are RECOMMENDED for use as the basis of other vocabularies.
999988
</t>
1000989
<section title="Keyword Independence">
1001990
<t>
1002-
Validation keywords typically operate independently, without
991+
Schema keywords typically operate independently, without
1003992
affecting each other's outcomes.
1004993
</t>
1005994
<t>
1006995
For schema author convenience, there are some exceptions among the
1007-
keywords that control subschema applicability:
996+
keywords in this vocabulary:
1008997
<list>
1009998
<t>
1010999
"additionalProperties", whose behavior is defined in terms of
@@ -1018,8 +1007,20 @@
10181007
</section>
10191008

10201009
<section title="Keywords for Applying Subschemas in Place">
1010+
<t>
1011+
These keywords apply subschemas to the same location in the instance
1012+
as the parent schema is being applied. They allow combining
1013+
or modifying the subschema results in various ways.
1014+
</t>
10211015

10221016
<section title="Keywords for Applying Subschemas With Boolean Logic" anchor="logic">
1017+
<t>
1018+
These keywords correspond to logical operators for combining or modifying
1019+
the boolean assertion results of the subschemas. They have no direct
1020+
impact on annotation collection, although they enable the same annotation
1021+
keyword to be applied to an instance location with different values.
1022+
Annotation keywords define their own rules for combining such values.
1023+
</t>
10231024
<section title="allOf">
10241025
<t>
10251026
This keyword's value MUST be a non-empty array.
@@ -1118,7 +1119,7 @@
11181119
</t>
11191120
<t>
11201121
When "if" is present, and the instance successfully
1121-
validates against its subschema, then valiation
1122+
validates against its subschema, then validation
11221123
succeeds against this keyword if the instance also
11231124
successfully validates against this keyword's subschema.
11241125
</t>
@@ -1136,7 +1137,7 @@
11361137
</t>
11371138
<t>
11381139
When "if" is present, and the instance fails to
1139-
validate against its subschema, then valiation
1140+
validate against its subschema, then validation
11401141
succeeds against this keyword if the instance
11411142
successfully validates against this keyword's subschema.
11421143
</t>
@@ -1151,6 +1152,11 @@
11511152
</section>
11521153
</section>
11531154
<section title="Keywords for Applying Subschemas to Child Instances">
1155+
<t>
1156+
Each of these keywords defines a rule for applying its
1157+
subschema(s) to child instances, specifically object
1158+
properties and array items, and combining their results.
1159+
</t>
11541160
<section title="Keywords for Applying Subschemas to Arrays">
11551161
<section title="items">
11561162
<t>

0 commit comments

Comments
 (0)