@@ -32,8 +32,9 @@ keyword is a generalisation of the [`items`]({{< ref "2020-12/applicator/items"
32
32
> }}) keyword that considers related keywords even when they are not direct
33
33
siblings of this keyword. More specifically, this keyword is affected by
34
34
occurences of [ ` prefixItems ` ] ({{< ref "2020-12/applicator/prefixitems" >}}),
35
- [ ` items ` ] ({{< ref "2020-12/applicator/items" >}}), and [ ` unevaluatedItems ` ] ({{<
36
- ref "2020-12/unevaluated/unevaluateditems"
35
+ [ ` items ` ] ({{< ref "2020-12/applicator/items" >}}), [ ` contains ` ] ({{< ref
36
+ "2020-12/applicator/contains" >}}), and [ ` unevaluatedItems ` ] ({{< ref
37
+ "2020-12/unevaluated/unevaluateditems"
37
38
> }}) itself, as long as the evaluate path that led to
38
39
[ ` unevaluatedItems ` ] ({{< ref "2020-12/unevaluated/unevaluateditems"
39
40
> }}) is a _ prefix_ of the evaluate path of the others.
@@ -45,13 +46,15 @@ other keyword from every other vocabulary.
45
46
46
47
There are two common use cases for this keyword, both for reducing duplication:
47
48
(1) Elegantly describing additional array items while declaring the
48
- [ ` prefixItems ` ] ({{< ref "2020-12/applicator/prefixitems" >}}) keyword behind
49
+ [ ` prefixItems ` ] ({{< ref "2020-12/applicator/prefixitems" >}}) or
50
+ [ ` contains ` ] ({{< ref "2020-12/applicator/contains" >}}) keywords behind
49
51
conditional logic without duplicating the [ ` items ` ] ({{< ref
50
52
"2020-12/applicator/items"
51
53
> }}) keyword in every possible branch. (2) Re-using
52
54
helpers that consist of the [ ` prefixItems ` ] ({{< ref
53
- "2020-12/applicator/prefixitems" >}}) or [ ` items ` ] ({{< ref
54
- "2020-12/applicator/items" >}}) keywords, while specialising the helpers as
55
+ "2020-12/applicator/prefixitems" >}}), [ ` items ` ] ({{< ref
56
+ "2020-12/applicator/items" >}}), or [ ` contains ` ] ({{< ref
57
+ "2020-12/applicator/contains" >}}) keywords, while specialising the helpers as
55
58
needed in specific locations without having to inline the entire contents of
56
59
the helper.
57
60
0 commit comments