Debian Codegraph @

spec/extras/$data/maxProperties.json

raw symbols SCIP
1 [
2 {
3 "description": "number of object properties is <= than another property",
4 "schema": {
5 "properties": {
6 "maxKeys": {},
7 "object": {"maxProperties": {"$data": "1/maxKeys"}}
8 }
9 },
10 "tests": [
11 {
12 "description": "shorter is valid",
13 "data": {
14 "maxKeys": 2,
15 "object": {"foo": 1}
16 },
17 "valid": true
18 },
19 {
20 "description": "exact length is valid",
21 "data": {
22 "maxKeys": 2,
23 "object": {"foo": 1, "bar": 2}
24 },
25 "valid": true
26 },
27 {
28 "description": "too long is invalid",
29 "data": {
30 "maxKeys": 2,
31 "object": {"foo": 1, "bar": 2, "baz": 3}
32 },
33 "valid": false
34 },
35 {
36 "description": "ignores non-objects",
37 "data": {
38 "maxKeys": 2,
39 "object": "foobar"
40 },
41 "valid": true
42 },
43 {
44 "description": "fails if value of maxProperties is not a number",
45 "data": {
46 "maxKeys": "2",
47 "object": {"foo": 1, "bar": 2}
48 },
49 "valid": false
50 },
51 {
52 "description": "valid if value of maxProperties is undefined",
53 "data": {
54 "object": {"foo": 1, "bar": 2}
55 },
56 "valid": true
57 }
58 ]
59 }
60 ]