summaryrefslogtreecommitdiff
path: root/json/tests/draft7/minItems.json
blob: d3b18720d06f2eebb40c8f57023f83f5e0f4bd80 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
[
    {
        "description": "minItems validation",
        "schema": {"minItems": 1},
        "tests": [
            {
                "description": "longer is valid",
                "data": [1, 2],
                "valid": true
            },
            {
                "description": "exact length is valid",
                "data": [1],
                "valid": true
            },
            {
                "description": "too short is invalid",
                "data": [],
                "valid": false
            },
            {
                "description": "ignores non-arrays",
                "data": "",
                "valid": true
            }
        ]
    },
    {
        "description": "minItems validation with a decimal",
        "schema": {"minItems": 1.0},
        "tests": [
            {
                "description": "longer is valid",
                "data": [1, 2],
                "valid": true
            },
            {
                "description": "too short is invalid",
                "data": [],
                "valid": false
            }
        ]
    }
]