xref: /aosp_15_r20/external/json-schema-validator/src/test/suite/tests/draft2020-12/vocabulary.json (revision 78c4dd6aa35290980cdcd1623a7e337e8d021c7c)
1[
2    {
3        "description": "schema that uses custom metaschema with with no validation vocabulary",
4        "schema": {
5            "$id": "https://schema/using/no/validation",
6            "$schema": "http://localhost:1234/draft2020-12/metaschema-no-validation.json",
7            "properties": {
8                "badProperty": false,
9                "numberProperty": {
10                    "minimum": 10
11                }
12            }
13        },
14        "tests": [
15            {
16                "description": "applicator vocabulary still works",
17                "data": {
18                    "badProperty": "this property should not exist"
19                },
20                "valid": false
21            },
22            {
23                "description": "no validation: valid number",
24                "data": {
25                    "numberProperty": 20
26                },
27                "valid": true
28            },
29            {
30                "description": "no validation: invalid number, but it still validates",
31                "data": {
32                    "numberProperty": 1
33                },
34                "valid": true
35            }
36        ]
37    },
38    {
39        "description": "ignore unrecognized optional vocabulary",
40        "schema": {
41            "$schema": "http://localhost:1234/draft2020-12/metaschema-optional-vocabulary.json",
42            "type": "number"
43        },
44        "tests": [
45            {
46                "description": "string value",
47                "data": "foobar",
48                "valid": false
49            },
50            {
51                "description": "number value",
52                "data": 20,
53                "valid": true
54            }
55        ]
56    }
57]
58