Debian Codegraph @

encoding/jsonschema/testdata/external/tests/draft2019-09/optional/format/time.json

raw
1 [
2 {
3 "description": "validation of time strings",
4 "schema": {
5 "$schema": "https://json-schema.org/draft/2019-09/schema",
6 "format": "time"
7 },
8 "skip": {
9 "v3-roundtrip": "generation only supported in version https://json-schema.org/draft/2020-12/schema"
10 },
11 "tests": [
12 {
13 "description": "all string formats ignore integers",
14 "data": 12,
15 "valid": true,
16 "skip": {
17 "v3-roundtrip": "could not extract schema"
18 }
19 },
20 {
21 "description": "all string formats ignore floats",
22 "data": 13.7,
23 "valid": true,
24 "skip": {
25 "v3-roundtrip": "could not extract schema"
26 }
27 },
28 {
29 "description": "all string formats ignore objects",
30 "data": {},
31 "valid": true,
32 "skip": {
33 "v3-roundtrip": "could not extract schema"
34 }
35 },
36 {
37 "description": "all string formats ignore arrays",
38 "data": [],
39 "valid": true,
40 "skip": {
41 "v3-roundtrip": "could not extract schema"
42 }
43 },
44 {
45 "description": "all string formats ignore booleans",
46 "data": false,
47 "valid": true,
48 "skip": {
49 "v3-roundtrip": "could not extract schema"
50 }
51 },
52 {
53 "description": "all string formats ignore nulls",
54 "data": null,
55 "valid": true,
56 "skip": {
57 "v3-roundtrip": "could not extract schema"
58 }
59 },
60 {
61 "description": "a valid time string",
62 "data": "08:30:06Z",
63 "valid": true,
64 "skip": {
65 "v3-roundtrip": "could not extract schema"
66 }
67 },
68 {
69 "description": "invalid time string with extra leading zeros",
70 "data": "008:030:006Z",
71 "valid": false,
72 "skip": {
73 "v3": "unexpected success",
74 "v3-roundtrip": "could not extract schema"
75 }
76 },
77 {
78 "description": "invalid time string with no leading zero for single digit",
79 "data": "8:3:6Z",
80 "valid": false,
81 "skip": {
82 "v3": "unexpected success",
83 "v3-roundtrip": "could not extract schema"
84 }
85 },
86 {
87 "description": "hour, minute, second must be two digits",
88 "data": "8:0030:6Z",
89 "valid": false,
90 "skip": {
91 "v3": "unexpected success",
92 "v3-roundtrip": "could not extract schema"
93 }
94 },
95 {
96 "description": "a valid time string with leap second, Zulu",
97 "data": "23:59:60Z",
98 "valid": true,
99 "skip": {
100 "v3-roundtrip": "could not extract schema"
101 }
102 },
103 {
104 "description": "invalid leap second, Zulu (wrong hour)",
105 "data": "22:59:60Z",
106 "valid": false,
107 "skip": {
108 "v3": "unexpected success",
109 "v3-roundtrip": "could not extract schema"
110 }
111 },
112 {
113 "description": "invalid leap second, Zulu (wrong minute)",
114 "data": "23:58:60Z",
115 "valid": false,
116 "skip": {
117 "v3": "unexpected success",
118 "v3-roundtrip": "could not extract schema"
119 }
120 },
121 {
122 "description": "valid leap second, zero time-offset",
123 "data": "23:59:60+00:00",
124 "valid": true,
125 "skip": {
126 "v3-roundtrip": "could not extract schema"
127 }
128 },
129 {
130 "description": "invalid leap second, zero time-offset (wrong hour)",
131 "data": "22:59:60+00:00",
132 "valid": false,
133 "skip": {
134 "v3": "unexpected success",
135 "v3-roundtrip": "could not extract schema"
136 }
137 },
138 {
139 "description": "invalid leap second, zero time-offset (wrong minute)",
140 "data": "23:58:60+00:00",
141 "valid": false,
142 "skip": {
143 "v3": "unexpected success",
144 "v3-roundtrip": "could not extract schema"
145 }
146 },
147 {
148 "description": "valid leap second, positive time-offset",
149 "data": "01:29:60+01:30",
150 "valid": true,
151 "skip": {
152 "v3-roundtrip": "could not extract schema"
153 }
154 },
155 {
156 "description": "valid leap second, large positive time-offset",
157 "data": "23:29:60+23:30",
158 "valid": true,
159 "skip": {
160 "v3-roundtrip": "could not extract schema"
161 }
162 },
163 {
164 "description": "invalid leap second, positive time-offset (wrong hour)",
165 "data": "23:59:60+01:00",
166 "valid": false,
167 "skip": {
168 "v3": "unexpected success",
169 "v3-roundtrip": "could not extract schema"
170 }
171 },
172 {
173 "description": "invalid leap second, positive time-offset (wrong minute)",
174 "data": "23:59:60+00:30",
175 "valid": false,
176 "skip": {
177 "v3": "unexpected success",
178 "v3-roundtrip": "could not extract schema"
179 }
180 },
181 {
182 "description": "valid leap second, negative time-offset",
183 "data": "15:59:60-08:00",
184 "valid": true,
185 "skip": {
186 "v3-roundtrip": "could not extract schema"
187 }
188 },
189 {
190 "description": "valid leap second, large negative time-offset",
191 "data": "00:29:60-23:30",
192 "valid": true,
193 "skip": {
194 "v3-roundtrip": "could not extract schema"
195 }
196 },
197 {
198 "description": "invalid leap second, negative time-offset (wrong hour)",
199 "data": "23:59:60-01:00",
200 "valid": false,
201 "skip": {
202 "v3": "unexpected success",
203 "v3-roundtrip": "could not extract schema"
204 }
205 },
206 {
207 "description": "invalid leap second, negative time-offset (wrong minute)",
208 "data": "23:59:60-00:30",
209 "valid": false,
210 "skip": {
211 "v3": "unexpected success",
212 "v3-roundtrip": "could not extract schema"
213 }
214 },
215 {
216 "description": "a valid time string with second fraction",
217 "data": "23:20:50.52Z",
218 "valid": true,
219 "skip": {
220 "v3-roundtrip": "could not extract schema"
221 }
222 },
223 {
224 "description": "a valid time string with precise second fraction",
225 "data": "08:30:06.283185Z",
226 "valid": true,
227 "skip": {
228 "v3-roundtrip": "could not extract schema"
229 }
230 },
231 {
232 "description": "a valid time string with plus offset",
233 "data": "08:30:06+00:20",
234 "valid": true,
235 "skip": {
236 "v3-roundtrip": "could not extract schema"
237 }
238 },
239 {
240 "description": "a valid time string with minus offset",
241 "data": "08:30:06-08:00",
242 "valid": true,
243 "skip": {
244 "v3-roundtrip": "could not extract schema"
245 }
246 },
247 {
248 "description": "hour, minute in time-offset must be two digits",
249 "data": "08:30:06-8:000",
250 "valid": false,
251 "skip": {
252 "v3": "unexpected success",
253 "v3-roundtrip": "could not extract schema"
254 }
255 },
256 {
257 "description": "a valid time string with case-insensitive Z",
258 "data": "08:30:06z",
259 "valid": true,
260 "skip": {
261 "v3-roundtrip": "could not extract schema"
262 }
263 },
264 {
265 "description": "an invalid time string with invalid hour",
266 "data": "24:00:00Z",
267 "valid": false,
268 "skip": {
269 "v3": "unexpected success",
270 "v3-roundtrip": "could not extract schema"
271 }
272 },
273 {
274 "description": "an invalid time string with invalid minute",
275 "data": "00:60:00Z",
276 "valid": false,
277 "skip": {
278 "v3": "unexpected success",
279 "v3-roundtrip": "could not extract schema"
280 }
281 },
282 {
283 "description": "an invalid time string with invalid second",
284 "data": "00:00:61Z",
285 "valid": false,
286 "skip": {
287 "v3": "unexpected success",
288 "v3-roundtrip": "could not extract schema"
289 }
290 },
291 {
292 "description": "an invalid time string with invalid leap second (wrong hour)",
293 "data": "22:59:60Z",
294 "valid": false,
295 "skip": {
296 "v3": "unexpected success",
297 "v3-roundtrip": "could not extract schema"
298 }
299 },
300 {
301 "description": "an invalid time string with invalid leap second (wrong minute)",
302 "data": "23:58:60Z",
303 "valid": false,
304 "skip": {
305 "v3": "unexpected success",
306 "v3-roundtrip": "could not extract schema"
307 }
308 },
309 {
310 "description": "an invalid time string with invalid time numoffset hour",
311 "data": "01:02:03+24:00",
312 "valid": false,
313 "skip": {
314 "v3": "unexpected success",
315 "v3-roundtrip": "could not extract schema"
316 }
317 },
318 {
319 "description": "an invalid time string with invalid time numoffset minute",
320 "data": "01:02:03+00:60",
321 "valid": false,
322 "skip": {
323 "v3": "unexpected success",
324 "v3-roundtrip": "could not extract schema"
325 }
326 },
327 {
328 "description": "an invalid time string with invalid time with both Z and numoffset",
329 "data": "01:02:03Z+00:30",
330 "valid": false,
331 "skip": {
332 "v3": "unexpected success",
333 "v3-roundtrip": "could not extract schema"
334 }
335 },
336 {
337 "description": "an invalid offset indicator",
338 "data": "08:30:06 PST",
339 "valid": false,
340 "skip": {
341 "v3": "unexpected success",
342 "v3-roundtrip": "could not extract schema"
343 }
344 },
345 {
346 "description": "only RFC3339 not all of ISO 8601 are valid",
347 "data": "01:01:01,1111",
348 "valid": false,
349 "skip": {
350 "v3": "unexpected success",
351 "v3-roundtrip": "could not extract schema"
352 }
353 },
354 {
355 "description": "no time offset",
356 "data": "12:00:00",
357 "valid": false,
358 "skip": {
359 "v3": "unexpected success",
360 "v3-roundtrip": "could not extract schema"
361 }
362 },
363 {
364 "description": "no time offset with second fraction",
365 "data": "12:00:00.52",
366 "valid": false,
367 "skip": {
368 "v3": "unexpected success",
369 "v3-roundtrip": "could not extract schema"
370 }
371 },
372 {
373 "description": "invalid non-ASCII '২' (a Bengali 2)",
374 "data": "1২:00:00Z",
375 "valid": false,
376 "skip": {
377 "v3": "unexpected success",
378 "v3-roundtrip": "could not extract schema"
379 }
380 },
381 {
382 "description": "offset not starting with plus or minus",
383 "data": "08:30:06#00:20",
384 "valid": false,
385 "skip": {
386 "v3": "unexpected success",
387 "v3-roundtrip": "could not extract schema"
388 }
389 },
390 {
391 "description": "contains letters",
392 "data": "ab:cd:ef",
393 "valid": false,
394 "skip": {
395 "v3": "unexpected success",
396 "v3-roundtrip": "could not extract schema"
397 }
398 }
399 ]
400 }
401 ]