summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/rapidjson/bin/jsonschema/tests/draft4/default.json
blob: 17629779fbeabea738a101fba2b305990e096466 (plain) (blame)
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
45
46
47
48
49
[
    {
        "description": "invalid type for default",
        "schema": {
            "properties": {
                "foo": {
                    "type": "integer",
                    "default": []
                }
            }
        },
        "tests": [
            {
                "description": "valid when property is specified",
                "data": {"foo": 13},
                "valid": true
            },
            {
                "description": "still valid when the invalid default is used",
                "data": {},
                "valid": true
            }
        ]
    },
    {
        "description": "invalid string value for default",
        "schema": {
            "properties": {
                "bar": {
                    "type": "string",
                    "minLength": 4,
                    "default": "bad"
                }
            }
        },
        "tests": [
            {
                "description": "valid when property is specified",
                "data": {"bar": "good"},
                "valid": true
            },
            {
                "description": "still valid when the invalid default is used",
                "data": {},
                "valid": true
            }
        ]
    }
]