Debian Codegraph @

share/tests/draft7/maxItems.json

raw
1 [
2 {
3 "description": "maxItems validation",
4 "schema": {"maxItems": 2},
5 "tests": [
6 {
7 "description": "shorter is valid",
8 "data": [1],
9 "valid": true
10 },
11 {
12 "description": "exact length is valid",
13 "data": [1, 2],
14 "valid": true
15 },
16 {
17 "description": "too long is invalid",
18 "data": [1, 2, 3],
19 "valid": false
20 },
21 {
22 "description": "ignores non-arrays",
23 "data": "foobar",
24 "valid": true
25 }
26 ]
27 },
28 {
29 "description": "maxItems validation with a decimal",
30 "schema": {"maxItems": 2.0},
31 "tests": [
32 {
33 "description": "shorter is valid",
34 "data": [1],
35 "valid": true
36 },
37 {
38 "description": "too long is invalid",
39 "data": [1, 2, 3],
40 "valid": false
41 }
42 ]
43 }
44 ]