Skip to content

Commit

Permalink
Also allow empty "dependencies" array.
Browse files Browse the repository at this point in the history
Same rationale as for empty "requirements."
  • Loading branch information
handrews committed Nov 11, 2016
1 parent ac8e207 commit 42f2a31
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
6 changes: 3 additions & 3 deletions jsonschema-validation.xml
Original file line number Diff line number Diff line change
Expand Up @@ -524,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 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
value must be a property that exists in the instance.
</t>
</section>
Expand Down
5 changes: 1 addition & 4 deletions schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@
"type": "array",
"items": { "type": "string" },
"uniqueItems": true
},
"nonEmptyStringArray": {
"allOf": [ { "$ref": "#/definitions/stringArray" }, { "minItems": 1 } ]
}
},
"type": "object",
Expand Down Expand Up @@ -120,7 +117,7 @@
"additionalProperties": {
"anyOf": [
{ "$ref": "#" },
{ "$ref": "#/definitions/nonEmptyStringArray" }
{ "$ref": "#/definitions/stringArray" }
]
}
},
Expand Down

0 comments on commit 42f2a31

Please sign in to comment.