Debian Codegraph @

spec/tests/schemas/cosmicrealms.json

raw symbols SCIP
1 [
2 {
3 "description": "schema from cosmicrealms benchmark",
4 "schema": {
5 "name": "test",
6 "type": "object",
7 "additionalProperties": false,
8 "required": [
9 "fullName",
10 "age",
11 "zip",
12 "married",
13 "dozen",
14 "dozenOrBakersDozen",
15 "favoriteEvenNumber",
16 "topThreeFavoriteColors",
17 "favoriteSingleDigitWholeNumbers",
18 "favoriteFiveLetterWord",
19 "emailAddresses",
20 "ipAddresses"
21 ],
22 "properties": {
23 "fullName": {"type": "string"},
24 "age": {"type": "integer", "minimum": 0},
25 "optionalItem": {"type": "string"},
26 "state": {"type": "string"},
27 "city": {"type": "string"},
28 "zip": {"type": "integer", "minimum": 0, "maximum": 99999},
29 "married": {"type": "boolean"},
30 "dozen": {"type": "integer", "minimum": 12, "maximum": 12},
31 "dozenOrBakersDozen": {"type": "integer", "minimum": 12, "maximum": 13},
32 "favoriteEvenNumber": {"type": "integer", "multipleOf": 2},
33 "topThreeFavoriteColors": {
34 "type": "array",
35 "minItems": 3,
36 "maxItems": 3,
37 "uniqueItems": true,
38 "items": {"type": "string"}
39 },
40 "favoriteSingleDigitWholeNumbers": {
41 "type": "array",
42 "minItems": 1,
43 "maxItems": 10,
44 "uniqueItems": true,
45 "items": {"type": "integer", "minimum": 0, "maximum": 9}
46 },
47 "favoriteFiveLetterWord": {
48 "type": "string",
49 "minLength": 5,
50 "maxLength": 5
51 },
52 "emailAddresses": {
53 "type": "array",
54 "minItems": 1,
55 "uniqueItems": true,
56 "items": {"type": "string", "format": "email"}
57 },
58 "ipAddresses": {
59 "type": "array",
60 "uniqueItems": true,
61 "items": {"type": "string", "format": "ipv4"}
62 }
63 }
64 },
65 "tests": [
66 {
67 "description": "valid data from cosmicrealms benchmark",
68 "data": {
69 "fullName": "John Smith",
70 "state": "CA",
71 "city": "Los Angeles",
72 "favoriteFiveLetterWord": "hello",
73 "emailAddresses": [
74 "[email protected]",
75 "[email protected]",
76 "[email protected]",
77 "[email protected]"
78 ],
79 "dozen": 12,
80 "dozenOrBakersDozen": 13,
81 "favoriteEvenNumber": 24,
82 "married": true,
83 "age": 17,
84 "zip": 65794,
85 "topThreeFavoriteColors": ["blue", "black", "yellow"],
86 "favoriteSingleDigitWholeNumbers": [2, 1, 3, 9],
87 "ipAddresses": ["225.234.40.3", "96.216.243.54", "18.126.145.83", "196.17.191.239"]
88 },
89 "valid": true
90 },
91 {
92 "description": "invalid data",
93 "data": {
94 "state": null,
95 "city": 90912,
96 "zip": [null],
97 "married": "married",
98 "dozen": 90912,
99 "dozenOrBakersDozen": null,
100 "favoriteEvenNumber": -1294145,
101 "emailAddresses": [],
102 "topThreeFavoriteColors": [
103 null,
104 null,
105 0.7925170068027211,
106 1.2478632478632479,
107 1.173913043478261,
108 0.4472049689440994
109 ],
110 "favoriteSingleDigitWholeNumbers": [],
111 "favoriteFiveLetterWord": "more than five letters",
112 "ipAddresses": [
113 "55.335.74.758",
114 "191.266.92.805",
115 "193.388.390.250",
116 "269.375.318.49",
117 "120.268.59.140"
118 ]
119 },
120 "valid": false
121 }
122 ]
123 }
124 ]