Skip to content

Commit 965426a

Browse files
authored
Merge pull request #190 from handrews/stringarray
String arrays default to empty.
2 parents 6e5563d + bc536c2 commit 965426a

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

jsonschema-validation.xml

+5-1
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,10 @@
461461
An object instance is valid against this keyword if its
462462
property set contains all elements in this keyword's array value.
463463
</t>
464+
<t>
465+
If this keyword is not present, it may be considered present
466+
as an empty array.
467+
</t>
464468
</section>
465469

466470
<section title="properties">
@@ -615,7 +619,7 @@
615619
</section>
616620

617621
<section title="anyOf">
618-
<t>
622+
<t>
619623
This keyword's value MUST be an array. This array MUST have at least one
620624
element.
621625
</t>

schema.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@
3232
"stringArray": {
3333
"type": "array",
3434
"items": { "type": "string" },
35-
"uniqueItems": true
35+
"uniqueItems": true,
36+
"defaultItems": []
3637
}
3738
},
3839
"type": ["object", "boolean"],

0 commit comments

Comments
 (0)