Debian Codegraph @

ajv-formats/tests/extras/formatMaximum.json

raw symbols SCIP
1 [
2 {
3 "description": "formatMaximum validation with date format",
4 "schema": {
5 "type": "string",
6 "format": "date",
7 "formatMaximum": "2015-08-17"
8 },
9 "tests": [
10 {
11 "description": "after the maximum date is invalid",
12 "data": "2015-11-09",
13 "valid": false
14 },
15 {
16 "description": "boundary point is valid",
17 "data": "2015-08-17",
18 "valid": true
19 },
20 {
21 "description": "before the maximum date is valid",
22 "data": "2014-12-03",
23 "valid": true
24 }
25 ]
26 },
27 {
28 "description": "formatExclusiveMaximum validation with date format",
29 "schema": {
30 "type": "string",
31 "format": "date",
32 "formatExclusiveMaximum": "2015-08-17"
33 },
34 "tests": [
35 {
36 "description": "after the maximum date is still invalid",
37 "data": "2015-11-09",
38 "valid": false
39 },
40 {
41 "description": "boundary point is invalid",
42 "data": "2015-08-17",
43 "valid": false
44 },
45 {
46 "description": "before the maximum date is still valid",
47 "data": "2014-12-03",
48 "valid": true
49 }
50 ]
51 },
52 {
53 "description": "formatMaximum validation with time format",
54 "schema": {
55 "type": "string",
56 "format": "time",
57 "formatMaximum": "13:15:17.000Z"
58 },
59 "tests": [
60 {
61 "description": "time after the maximum time is invalid",
62 "data": "15:11:09.000Z",
63 "valid": false
64 },
65 {
66 "description": "boundary point is valid",
67 "data": "13:15:17.000Z",
68 "valid": true
69 },
70 {
71 "description": "time before the maximum time is valid, timezone is taken into account",
72 "data": "13:15:17.000+01:00",
73 "valid": true
74 },
75 {
76 "description": "boundary point is valid, timezone is taken into account",
77 "data": "14:15:17.000+01:00",
78 "valid": true
79 },
80 {
81 "description": "time after the maximum time is invalid, timezone is taken into account",
82 "data": "14:20:17.000+01:00",
83 "valid": false
84 },
85 {
86 "description": "time before the maximum time is valid",
87 "data": "10:33:55.000Z",
88 "valid": true
89 }
90 ]
91 },
92 {
93 "description": "formatExclusiveMaximum validation with time format",
94 "schema": {
95 "type": "string",
96 "format": "time",
97 "formatExclusiveMaximum": "13:15:17.000Z"
98 },
99 "tests": [
100 {
101 "description": "time after the maximum time is still invalid",
102 "data": "15:11:09.000Z",
103 "valid": false
104 },
105 {
106 "description": "boundary point is invalid",
107 "data": "13:15:17.000Z",
108 "valid": false
109 },
110 {
111 "description": "boundary point is invalid, timezone is taken into account",
112 "data": "14:15:17.000+01:00",
113 "valid": false
114 },
115 {
116 "description": "time before the maximum time is still valid",
117 "data": "10:33:55.000Z",
118 "valid": true
119 }
120 ]
121 },
122 {
123 "description": "formatMaximum validation with date-time format",
124 "schema": {
125 "type": "string",
126 "format": "date-time",
127 "formatMaximum": "2015-08-17T13:15:17.000Z"
128 },
129 "tests": [
130 {
131 "description": "date after the maximum date is invalid",
132 "data": "2015-11-09T13:15:17.000Z",
133 "valid": false
134 },
135 {
136 "description": "same date, time after the maximum time is invalid",
137 "data": "2015-08-17T15:11:09.000Z",
138 "valid": false
139 },
140 {
141 "description": "boundary point is valid",
142 "data": "2015-08-17T13:15:17.000Z",
143 "valid": true
144 },
145 {
146 "description": "same date, time before the maximum time is valid",
147 "data": "2015-08-17T10:33:55.000Z",
148 "valid": true
149 },
150 {
151 "description": "date before the maximum date is valid",
152 "data": "2014-12-03T13:15:17.000Z",
153 "valid": true
154 }
155 ]
156 },
157 {
158 "description": "formatExclusiveMaximum validation with date-time format",
159 "schema": {
160 "type": "string",
161 "format": "date-time",
162 "formatExclusiveMaximum": "2015-08-17T13:15:17.000Z"
163 },
164 "tests": [
165 {
166 "description": "date after the maximum date is still invalid",
167 "data": "2015-11-09T13:15:17.000Z",
168 "valid": false
169 },
170 {
171 "description": "same date, time after the maximum time is still invalid",
172 "data": "2015-08-17T15:11:09.000Z",
173 "valid": false
174 },
175 {
176 "description": "boundary point is invalid",
177 "data": "2015-08-17T13:15:17.000Z",
178 "valid": false
179 },
180 {
181 "description": "same date, time before the maximum time is still valid",
182 "data": "2015-08-17T10:33:55.000Z",
183 "valid": true
184 },
185 {
186 "description": "date before the maximum date is still valid",
187 "data": "2014-12-03T13:15:17.000Z",
188 "valid": true
189 }
190 ]
191 },
192 {
193 "description": "formatMaximum validation with iso-time format",
194 "schema": {
195 "type": "string",
196 "format": "iso-time",
197 "formatMaximum": "13:15:17.000Z"
198 },
199 "tests": [
200 {
201 "description": "time after the maximum time is invalid",
202 "data": "15:11:09.000Z",
203 "valid": false
204 },
205 {
206 "description": "boundary point is valid",
207 "data": "13:15:17.000Z",
208 "valid": true
209 },
210 {
211 "description": "time before the maximum time is valid, timezone is ignored",
212 "data": "13:15:16.000+01:00",
213 "valid": true
214 },
215 {
216 "description": "boundary point is valid, timezone is ignored",
217 "data": "13:15:17.000+01:00",
218 "valid": true
219 },
220 {
221 "description": "time after the maximum time is invalid, timezone is ignored",
222 "data": "13:15:18.000+01:00",
223 "valid": false
224 },
225 {
226 "description": "time before the maximum time is valid",
227 "data": "10:33:55.000Z",
228 "valid": true
229 }
230 ]
231 },
232 {
233 "description": "formatExclusiveMaximum validation with iso-time format",
234 "schema": {
235 "type": "string",
236 "format": "iso-time",
237 "formatExclusiveMaximum": "13:15:17.000Z"
238 },
239 "tests": [
240 {
241 "description": "time after the maximum time is still invalid",
242 "data": "15:11:09.000Z",
243 "valid": false
244 },
245 {
246 "description": "boundary point is invalid",
247 "data": "13:15:17.000Z",
248 "valid": false
249 },
250 {
251 "description": "boundary point is invalid, timezone is ignored",
252 "data": "13:15:17.000+01:00",
253 "valid": false
254 },
255 {
256 "description": "time before the maximum time is still valid",
257 "data": "10:33:55.000Z",
258 "valid": true
259 }
260 ]
261 },
262 {
263 "description": "formatMaximum validation with iso-date-time format",
264 "schema": {
265 "type": "string",
266 "format": "iso-date-time",
267 "formatMaximum": "2015-08-17T13:15:17.000Z"
268 },
269 "tests": [
270 {
271 "description": "date after the maximum date is invalid",
272 "data": "2015-11-09T13:15:17.000Z",
273 "valid": false
274 },
275 {
276 "description": "same date, time after the maximum time is invalid",
277 "data": "2015-08-17T15:11:09.000Z",
278 "valid": false
279 },
280 {
281 "description": "boundary point is valid",
282 "data": "2015-08-17T13:15:17.000Z",
283 "valid": true
284 },
285 {
286 "description": "same date, time before the maximum time is valid",
287 "data": "2015-08-17T10:33:55.000Z",
288 "valid": true
289 },
290 {
291 "description": "date before the maximum date is valid",
292 "data": "2014-12-03T13:15:17.000Z",
293 "valid": true
294 }
295 ]
296 },
297 {
298 "description": "formatExclusiveMaximum validation with iso-date-time format",
299 "schema": {
300 "type": "string",
301 "format": "iso-date-time",
302 "formatExclusiveMaximum": "2015-08-17T13:15:17.000Z"
303 },
304 "tests": [
305 {
306 "description": "date after the maximum date is still invalid",
307 "data": "2015-11-09T13:15:17.000Z",
308 "valid": false
309 },
310 {
311 "description": "same date, time after the maximum time is still invalid",
312 "data": "2015-08-17T15:11:09.000Z",
313 "valid": false
314 },
315 {
316 "description": "boundary point is invalid",
317 "data": "2015-08-17T13:15:17.000Z",
318 "valid": false
319 },
320 {
321 "description": "same date, time before the maximum time is still valid",
322 "data": "2015-08-17T10:33:55.000Z",
323 "valid": true
324 },
325 {
326 "description": "date before the maximum date is still valid",
327 "data": "2014-12-03T13:15:17.000Z",
328 "valid": true
329 }
330 ]
331 },
332 {
333 "description": "formatMaximum is valid with whitelisted unknown format",
334 "schema": {
335 "type": "string",
336 "format": "allowedUnknown",
337 "formatMaximum": "2015"
338 },
339 "tests": [
340 {
341 "description": "valid string",
342 "data": "2016",
343 "valid": true
344 }
345 ]
346 }
347 ]