summaryrefslogtreecommitdiff
path: root/tests/draft2020-12/vocabulary.json
blob: 1acb96a934daee396fb0bd5c28bc37f7aa5c192f (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
45
46
47
48
49
50
51
52
53
54
55
56
57
[
    {
        "description": "schema that uses custom metaschema with with no validation vocabulary",
        "schema": {
            "$id": "https://schema/using/no/validation",
            "$schema": "http://localhost:1234/draft2020-12/metaschema-no-validation.json",
            "properties": {
                "badProperty": false,
                "numberProperty": {
                    "minimum": 10
                }
            }
        },
        "tests": [
            {
                "description": "applicator vocabulary still works",
                "data": {
                    "badProperty": "this property should not exist"
                },
                "valid": false
            },
            {
                "description": "no validation: valid number",
                "data": {
                    "numberProperty": 20
                },
                "valid": true
            },
            {
                "description": "no validation: invalid number, but it still validates",
                "data": {
                    "numberProperty": 1
                },
                "valid": true
            }
        ]
    },
    {
        "description": "ignore unrecognized optional vocabulary",
        "schema": {
            "$schema": "http://localhost:1234/draft2020-12/metaschema-optional-vocabulary.json",
            "type": "number"
        },
        "tests": [
            {
                "description": "string value",
                "data": "foobar",
                "valid": false
            },
            {
                "description": "number value",
                "data": 20,
                "valid": true
            }
        ]
    }
]