Skip to content

Conversation

@schmeiserd
Copy link

This fixes a bug with valid empty JSON arrays.

Example:

This JSON
{"cars":[]}

violates this schema
{
"description": "cars",
"type": "object",
"properties": {
"cars": {
"type": "array",
"required": true,
"minItems": 0,
"items": [
{
"type": "object",
"required": true,
"properties": {
"carBrand": {
"type": "string",
"required": true
},
"carModel": {
"type": "string",
"required": true
}}}]}}}

with this error
cars[0] - is missing and it is required

justinrainbow added a commit that referenced this pull request Dec 7, 2013
@justinrainbow justinrainbow merged commit 91ed23e into jsonrainbow:master Dec 7, 2013
hakre pushed a commit to hakre/json-schema that referenced this pull request Mar 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants