Debian Codegraph @

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

raw
1 [
2 {
3 "description": "validation of IPv6 addresses",
4 "schema": {
5 "$schema": "https://json-schema.org/draft/2019-09/schema",
6 "format": "ipv6"
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 IPv6 address",
62 "data": "::1",
63 "valid": true,
64 "skip": {
65 "v3-roundtrip": "could not extract schema"
66 }
67 },
68 {
69 "description": "an IPv6 address with out-of-range values",
70 "data": "12345::",
71 "valid": false,
72 "skip": {
73 "v3": "unexpected success",
74 "v3-roundtrip": "could not extract schema"
75 }
76 },
77 {
78 "description": "trailing 4 hex symbols is valid",
79 "data": "::abef",
80 "valid": true,
81 "skip": {
82 "v3-roundtrip": "could not extract schema"
83 }
84 },
85 {
86 "description": "trailing 5 hex symbols is invalid",
87 "data": "::abcef",
88 "valid": false,
89 "skip": {
90 "v3": "unexpected success",
91 "v3-roundtrip": "could not extract schema"
92 }
93 },
94 {
95 "description": "an IPv6 address with too many components",
96 "data": "1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1",
97 "valid": false,
98 "skip": {
99 "v3": "unexpected success",
100 "v3-roundtrip": "could not extract schema"
101 }
102 },
103 {
104 "description": "an IPv6 address containing illegal characters",
105 "data": "::laptop",
106 "valid": false,
107 "skip": {
108 "v3": "unexpected success",
109 "v3-roundtrip": "could not extract schema"
110 }
111 },
112 {
113 "description": "no digits is valid",
114 "data": "::",
115 "valid": true,
116 "skip": {
117 "v3-roundtrip": "could not extract schema"
118 }
119 },
120 {
121 "description": "leading colons is valid",
122 "data": "::42:ff:1",
123 "valid": true,
124 "skip": {
125 "v3-roundtrip": "could not extract schema"
126 }
127 },
128 {
129 "description": "trailing colons is valid",
130 "data": "d6::",
131 "valid": true,
132 "skip": {
133 "v3-roundtrip": "could not extract schema"
134 }
135 },
136 {
137 "description": "missing leading octet is invalid",
138 "data": ":2:3:4:5:6:7:8",
139 "valid": false,
140 "skip": {
141 "v3": "unexpected success",
142 "v3-roundtrip": "could not extract schema"
143 }
144 },
145 {
146 "description": "missing trailing octet is invalid",
147 "data": "1:2:3:4:5:6:7:",
148 "valid": false,
149 "skip": {
150 "v3": "unexpected success",
151 "v3-roundtrip": "could not extract schema"
152 }
153 },
154 {
155 "description": "missing leading octet with omitted octets later",
156 "data": ":2:3:4::8",
157 "valid": false,
158 "skip": {
159 "v3": "unexpected success",
160 "v3-roundtrip": "could not extract schema"
161 }
162 },
163 {
164 "description": "single set of double colons in the middle is valid",
165 "data": "1:d6::42",
166 "valid": true,
167 "skip": {
168 "v3-roundtrip": "could not extract schema"
169 }
170 },
171 {
172 "description": "two sets of double colons is invalid",
173 "data": "1::d6::42",
174 "valid": false,
175 "skip": {
176 "v3": "unexpected success",
177 "v3-roundtrip": "could not extract schema"
178 }
179 },
180 {
181 "description": "mixed format with the ipv4 section as decimal octets",
182 "data": "1::d6:192.168.0.1",
183 "valid": true,
184 "skip": {
185 "v3-roundtrip": "could not extract schema"
186 }
187 },
188 {
189 "description": "mixed format with double colons between the sections",
190 "data": "1:2::192.168.0.1",
191 "valid": true,
192 "skip": {
193 "v3-roundtrip": "could not extract schema"
194 }
195 },
196 {
197 "description": "mixed format with ipv4 section with octet out of range",
198 "data": "1::2:192.168.256.1",
199 "valid": false,
200 "skip": {
201 "v3": "unexpected success",
202 "v3-roundtrip": "could not extract schema"
203 }
204 },
205 {
206 "description": "mixed format with ipv4 section with a hex octet",
207 "data": "1::2:192.168.ff.1",
208 "valid": false,
209 "skip": {
210 "v3": "unexpected success",
211 "v3-roundtrip": "could not extract schema"
212 }
213 },
214 {
215 "description": "mixed format with leading double colons (ipv4-mapped ipv6 address)",
216 "data": "::ffff:192.168.0.1",
217 "valid": true,
218 "skip": {
219 "v3-roundtrip": "could not extract schema"
220 }
221 },
222 {
223 "description": "triple colons is invalid",
224 "data": "1:2:3:4:5:::8",
225 "valid": false,
226 "skip": {
227 "v3": "unexpected success",
228 "v3-roundtrip": "could not extract schema"
229 }
230 },
231 {
232 "description": "8 octets",
233 "data": "1:2:3:4:5:6:7:8",
234 "valid": true,
235 "skip": {
236 "v3-roundtrip": "could not extract schema"
237 }
238 },
239 {
240 "description": "insufficient octets without double colons",
241 "data": "1:2:3:4:5:6:7",
242 "valid": false,
243 "skip": {
244 "v3": "unexpected success",
245 "v3-roundtrip": "could not extract schema"
246 }
247 },
248 {
249 "description": "no colons is invalid",
250 "data": "1",
251 "valid": false,
252 "skip": {
253 "v3": "unexpected success",
254 "v3-roundtrip": "could not extract schema"
255 }
256 },
257 {
258 "description": "ipv4 is not ipv6",
259 "data": "127.0.0.1",
260 "valid": false,
261 "skip": {
262 "v3": "unexpected success",
263 "v3-roundtrip": "could not extract schema"
264 }
265 },
266 {
267 "description": "ipv4 segment must have 4 octets",
268 "data": "1:2:3:4:1.2.3",
269 "valid": false,
270 "skip": {
271 "v3": "unexpected success",
272 "v3-roundtrip": "could not extract schema"
273 }
274 },
275 {
276 "description": "leading whitespace is invalid",
277 "data": " ::1",
278 "valid": false,
279 "skip": {
280 "v3": "unexpected success",
281 "v3-roundtrip": "could not extract schema"
282 }
283 },
284 {
285 "description": "trailing whitespace is invalid",
286 "data": "::1 ",
287 "valid": false,
288 "skip": {
289 "v3": "unexpected success",
290 "v3-roundtrip": "could not extract schema"
291 }
292 },
293 {
294 "description": "netmask is not a part of ipv6 address",
295 "data": "fe80::/64",
296 "valid": false,
297 "skip": {
298 "v3": "unexpected success",
299 "v3-roundtrip": "could not extract schema"
300 }
301 },
302 {
303 "description": "zone id is not a part of ipv6 address",
304 "data": "fe80::a%eth1",
305 "valid": false,
306 "skip": {
307 "v3": "unexpected success",
308 "v3-roundtrip": "could not extract schema"
309 }
310 },
311 {
312 "description": "a long valid ipv6",
313 "data": "1000:1000:1000:1000:1000:1000:255.255.255.255",
314 "valid": true,
315 "skip": {
316 "v3-roundtrip": "could not extract schema"
317 }
318 },
319 {
320 "description": "a long invalid ipv6, below length limit, first",
321 "data": "100:100:100:100:100:100:255.255.255.255.255",
322 "valid": false,
323 "skip": {
324 "v3": "unexpected success",
325 "v3-roundtrip": "could not extract schema"
326 }
327 },
328 {
329 "description": "a long invalid ipv6, below length limit, second",
330 "data": "100:100:100:100:100:100:100:255.255.255.255",
331 "valid": false,
332 "skip": {
333 "v3": "unexpected success",
334 "v3-roundtrip": "could not extract schema"
335 }
336 },
337 {
338 "description": "invalid non-ASCII '৪' (a Bengali 4)",
339 "data": "1:2:3:4:5:6:7:৪",
340 "valid": false,
341 "skip": {
342 "v3": "unexpected success",
343 "v3-roundtrip": "could not extract schema"
344 }
345 },
346 {
347 "description": "invalid non-ASCII '৪' (a Bengali 4) in the IPv4 portion",
348 "data": "1:2::192.16৪.0.1",
349 "valid": false,
350 "skip": {
351 "v3": "unexpected success",
352 "v3-roundtrip": "could not extract schema"
353 }
354 }
355 ]
356 }
357 ]