diff --git a/jsonschema-core.xml b/jsonschema-core.xml
index e6b5476e..513f4659 100644
--- a/jsonschema-core.xml
+++ b/jsonschema-core.xml
@@ -1417,7 +1417,7 @@
a letter ([A-Za-z]) or underscore ("_"), followed by any number of letters,
digits ([0-9]), hyphens ("-"), underscores ("_"), and periods (".").
This matches the US-ASCII part of XML's
- NCName production.
+ NCName type.
Note that the anchor string does not include the "#" character,
as it is not a URI-reference. An "$anchor": "foo" becomes the
@@ -2085,7 +2085,8 @@
"items", whose behavior is defined in terms of "prefixItems"
- "contains", whose behavior is defined in terms of "minContains"
+ "contains", whose behavior is affected by the presence and value of
+ "minContains", in the Validation vocabulary
@@ -2318,6 +2319,7 @@
positions within the instance array, it produces an
annotation result of boolean true, indicating that all remaining array
elements have been evaluated against this keyword's subschema.
+ This annotation affects the behavior of "unevaluatedItems".
Omitting this keyword has the same assertion behavior as
@@ -2337,15 +2339,18 @@
An array instance is valid against "contains" if at least one of
- its elements is valid against the given schema. The subschema MUST be
- applied to every array element even after the first match has
- been found, in order to collect annotations for use by other keywords.
- This is to ensure that all possible annotations are collected.
+ its elements is valid against the given schema, provided that
+ "minContains" is not present or is a value greater than 0.
- Logically, the validation result of applying the value subschema to each
- item in the array MUST be ORed with "false", resulting in an overall
- validation result.
+ If "minContains" is present and has a value of 0, then an array instance
+ is valid against this keyword only if NONE of its elements is valid
+ against the given schema.
+
+
+ The subschema MUST be applied to every array element even after the first
+ match has been found, in order to collect annotations for use by other
+ keywords. This is to ensure that all possible annotations are collected.
This keyword produces an annotation value which is an array of
@@ -2354,6 +2359,7 @@
the subschema validates successfully when applied to every index of the
instance. The annotation MUST be present if the instance array to which
this keyword's schema applies is empty.
+ This annotation affects the behavior of "unevaluatedItems".
@@ -2373,7 +2379,9 @@
The annotation result of this keyword is the set of instance
property names matched by this keyword.
-
+ This annotation affects the behavior of "additionalProperties" and
+ "unevaluatedProperties".
+
Omitting this keyword has the same assertion behavior as
an empty object.
@@ -2396,7 +2404,9 @@
The annotation result of this keyword is the set of instance
property names matched by this keyword.
-
+ This annotation affects the behavior of "additionalProperties" and
+ "unevaluatedProperties".
+
Omitting this keyword has the same assertion behavior as
an empty object.
@@ -2422,6 +2432,7 @@
The annotation result of this keyword is the set of instance
property names validated by this keyword's subschema.
+ This annotation affects the behavior of "unevaluatedProperties".
Omitting this keyword has the same assertion behavior as
@@ -2559,6 +2570,7 @@
positions within the instance array, it produces an
annotation result of boolean true, analogous to the
behavior of "items".
+ This annotation affects the behavior of "unevaluatedItems" in parent schemas.
Omitting this keyword has the same assertion behavior as
@@ -2602,6 +2614,7 @@
The annotation result of this keyword is the set of instance
property names validated by this keyword's subschema.
+ This annotation affects the behavior of "unevaluatedProperties" in parent schemas.
Omitting this keyword has the same assertion behavior as
@@ -3846,8 +3859,8 @@ https://example.com/schemas/common#/$defs/count/minimum
"$schema" MAY change for embedded resources
Array-value "items" functionality is now "prefixItems"
"items" subsumes the old function of "additionalItems"
- "contains" and "unevaluatedItems" interactions now specified
- Rename $recursive* to $dynamic*
+ "contains" annotation behavior, and "contains" and "unevaluatedItems" interactions now specified
+ Rename $recursive* to $dynamic*, with behavior modification
$dynamicAnchor defines a fragment like $anchor
$dynamic* (previously $recursive) no longer use runtime base URI determination
Define Compound Schema Documents (bundle) and processing
diff --git a/jsonschema-validation.xml b/jsonschema-validation.xml
index b8d68d69..1278ffd5 100644
--- a/jsonschema-validation.xml
+++ b/jsonschema-validation.xml
@@ -213,6 +213,23 @@
.
+
+
+ Schema keywords typically operate independently, without
+ affecting each other's outcomes.
+
+
+ For schema author convenience, there are some exceptions among the
+ keywords in this vocabulary:
+
+
+ "maxContains" and "minContains", whose behavior is affected by the
+ presence and value of "contains", in the Applicator vocabulary
+
+
+
+
+
@@ -418,6 +435,12 @@
result is a boolean "true" and the instance array length is less than or
equal to the "maxContains" value.
+
+ If annotations are not being collected, the validation value may be determined
+ by considering the number of instance elements that are valid against the
+ "contains" schema: validation is successful if and only if the number of valid
+ elements is less than or equal to the "maxContains" value.
+
@@ -437,10 +460,17 @@
annotation result is a boolean "true" and the instance array length is
greater than or equal to the "minContains" value.
+
+ If annotations are not being collected, the validation value may be determined
+ by considering the number of instance elements that are valid against the
+ "contains" schema: validation is successful if and only if the number of valid
+ elements is greater than or equal to the "minContains" value.
+
A value of 0 is allowed, but is only useful for setting a range
- of occurrences from 0 to the value of "maxContains". A value of
- 0 with no "maxContains" causes "contains" to always pass validation.
+ of occurrences from 0 to the value of "maxContains". A value of
+ 0 causes "contains" to always pass validation (but validation can still fail
+ against a "maxContains" keyword).
Omitting this keyword has the same behavior as a value of 1.
@@ -701,30 +731,34 @@
A string instance is valid against this attribute if it is
- a valid representation according to the "date-time" production.
-
+ a valid "date-time" representation according to the specification
+ referenced above
+
A string instance is valid against this attribute if it is
- a valid representation according to the "full-date" production.
-
+ a valid "full-date" representation according to the specification
+ referenced above
+
A string instance is valid against this attribute if it is
- a valid representation according to the "full-time" production.
-
+ a valid "full-time" representation according to the specification
+ referenced above
+
A string instance is valid against this attribute if it is
- a valid representation according to the "duration" production.
-
+ a valid "duration" representation according according to the
+ specification referenced above
+
Implementations MAY support additional attributes using the other
- production names defined anywhere in that RFC. If "full-date" or "full-time"
+ format names defined anywhere in that RFC. If "full-date" or "full-time"
are implemented, the corresponding short form ("date" or "time"
respectively) MUST be implemented, and MUST behave identically.
Implementations SHOULD NOT define extension attributes
- with any name matching an RFC 3339 production unless it validates
- according to the rules of that production.
+ with any name matching an RFC 3339 format unless it validates
+ according to the rules of that format.
There is not currently consensus on the need for supporting
all RFC 3339 formats, so this approach of reserving the