Debian Codegraph @

spec/extras/const.json

raw symbols SCIP
1 [
2 {
3 "description": "const keyword requires the value to be equal to some constant",
4 "schema": {"const": 2},
5 "tests": [
6 {
7 "description": "same value is valid",
8 "data": 2,
9 "valid": true
10 },
11 {
12 "description": "another value is invalid",
13 "data": 5,
14 "valid": false
15 },
16 {
17 "description": "another type is invalid",
18 "data": "a",
19 "valid": false
20 }
21 ]
22 },
23 {
24 "description": "const keyword requires the value to be equal to some object",
25 "schema": {"const": {"foo": "bar", "baz": "bax"}},
26 "tests": [
27 {
28 "description": "same object is valid",
29 "data": {"foo": "bar", "baz": "bax"},
30 "valid": true
31 },
32 {
33 "description": "same object with different property order is valid",
34 "data": {"baz": "bax", "foo": "bar"},
35 "valid": true
36 },
37 {
38 "description": "another object is invalid",
39 "data": {"foo": "bar"},
40 "valid": false
41 },
42 {
43 "description": "another type is invalid",
44 "data": [1, 2],
45 "valid": false
46 }
47 ]
48 },
49 {
50 "description": "const keyword with null",
51 "schema": {"const": null},
52 "tests": [
53 {
54 "description": "null is valid",
55 "data": null,
56 "valid": true
57 },
58 {
59 "description": "not null is invalid",
60 "data": 0,
61 "valid": false
62 }
63 ]
64 }
65 ]