Skip to content

Commit 4090d4c

Browse files
authored
Merge pull request #113 from handrews/contains
Add the "contains" keyword for array instances.
2 parents 29588b0 + 5a614b2 commit 4090d4c

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

jsonschema-validation.xml

+11
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,17 @@
394394
</t>
395395
</section>
396396

397+
<section title="contains">
398+
<t>
399+
The value of this keyword MUST be an object. This object MUST be
400+
a valid JSON Schema.
401+
</t>
402+
<t>
403+
An array instance is valid against "contains" if at least one of
404+
its elements is valid against the given schema.
405+
</t>
406+
</section>
407+
397408
<section title="maxProperties">
398409
<t>
399410
The value of this keyword MUST be an integer. This integer MUST be

schema.json

+1
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@
8787
"type": "boolean",
8888
"default": false
8989
},
90+
"contains": { "$ref": "#" },
9091
"maxProperties": { "$ref": "#/definitions/positiveInteger" },
9192
"minProperties": { "$ref": "#/definitions/positiveIntegerDefault0" },
9293
"required": { "$ref": "#/definitions/stringArray" },

0 commit comments

Comments
 (0)