Debian Codegraph @

spec/extras/contains.json

raw symbols SCIP
1 [
2 {
3 "description": "contains keyword requires the item matching schema to be present",
4 "schema": {
5 "contains": {"minimum": 5}
6 },
7 "tests": [
8 {
9 "description": "array with item matching schema (5) is valid",
10 "data": [3, 4, 5],
11 "valid": true
12 },
13 {
14 "description": "array with item matching schema (6) is valid",
15 "data": [3, 4, 6],
16 "valid": true
17 },
18 {
19 "description": "array without item matching schema is invalid",
20 "data": [1, 2, 3, 4],
21 "valid": false
22 },
23 {
24 "description": "empty array is invalid",
25 "data": [],
26 "valid": false
27 },
28 {
29 "description": "not array is valid",
30 "data": {},
31 "valid": true
32 }
33 ]
34 },
35 {
36 "description": "contains keyword with const keyword requires a specific item to be present",
37 "schema": {
38 "contains": {"const": 5}
39 },
40 "tests": [
41 {
42 "description": "array with item 5 is valid",
43 "data": [3, 4, 5],
44 "valid": true
45 },
46 {
47 "description": "array without item 5 is invalid",
48 "data": [1, 2, 3, 4],
49 "valid": false
50 }
51 ]
52 }
53 ]