Maxitems - sgpinkus/json-schema GitHub Wiki
THIS WIKI IS OBSOLETE. PLEASE SEE THE NEW JSON-SCHEMA-ORG/JSON-SCHEMA-SPEC REPOSITORY.
An array instance is valid with regards to this keyword if and only if its number of elements is less than, or equal to, this keyword's value.
The value of maxItems MUST be an integer. This integer MUST be greater than, or equal to, 0.
Given this schema:
{
"maxItems": 3
}
the following instances are valid:
- [];
- [ 1, 2, 3 ];
the following instances are invalid:
- [ "too", "many", "elements", "here" ];
- [ 1, 2, 3, 4, 5, null ].