Skip to content

fixed "empty array"-bug #79

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 7, 2013
Merged

fixed "empty array"-bug #79

merged 1 commit into from
Dec 7, 2013

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