Skip to content

Commit

Permalink
Merge pull request json-schema-org#113 from handrews/contains
Browse files Browse the repository at this point in the history
Add the "contains" keyword for array instances.
  • Loading branch information
awwright authored Nov 7, 2016
2 parents 29588b0 + 5a614b2 commit 4090d4c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
11 changes: 11 additions & 0 deletions jsonschema-validation.xml
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,17 @@
</t>
</section>

<section title="contains">
<t>
The value of this keyword MUST be an object. This object MUST be
a valid JSON Schema.
</t>
<t>
An array instance is valid against "contains" if at least one of
its elements is valid against the given schema.
</t>
</section>

<section title="maxProperties">
<t>
The value of this keyword MUST be an integer. This integer MUST be
Expand Down
1 change: 1 addition & 0 deletions schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
"type": "boolean",
"default": false
},
"contains": { "$ref": "#" },
"maxProperties": { "$ref": "#/definitions/positiveInteger" },
"minProperties": { "$ref": "#/definitions/positiveIntegerDefault0" },
"required": { "$ref": "#/definitions/stringArray" },
Expand Down

0 comments on commit 4090d4c

Please sign in to comment.