Skip to content

Commit

Permalink
Allow empty "required" and "dependencies" arrays.
Browse files Browse the repository at this point in the history
This addresses the enhancement requested in issue #69.

The "requirements" and "dependencies" string arrays should be
allowed to be empty, with the same effect as not being present.
  • Loading branch information
handrews committed Nov 15, 2016
1 parent 4090d4c commit d129ed4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
11 changes: 5 additions & 6 deletions jsonschema-validation.xml
Original file line number Diff line number Diff line change
Expand Up @@ -435,9 +435,8 @@

<section title="required">
<t>
The value of this keyword MUST be an array. This array MUST have at
least one element. Elements of this array MUST be strings, and MUST be
unique.
The value of this keyword MUST be an array. Elements of this array,
if any, MUST be strings, and MUST be unique.
</t>
<t>
An object instance is valid against this keyword if its
Expand Down Expand Up @@ -525,9 +524,9 @@
against the entire instance.
</t>
<t>
If the dependency value is an array, it MUST have at least one element, each
element MUST be a string, and elements in the array MUST be unique. If the
dependency key is a property in the instance, each of the items in the dependency
If the dependency value is an array, each element in the array,
if any, MUST be a string, and MUST be unique. If the dependency key is
a property in the instance, each of the items in the dependency
value must be a property that exists in the instance.
</t>
</section>
Expand Down
1 change: 0 additions & 1 deletion schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
"stringArray": {
"type": "array",
"items": { "type": "string" },
"minItems": 1,
"uniqueItems": true
}
},
Expand Down

0 comments on commit d129ed4

Please sign in to comment.