Debian Codegraph @

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

raw
1 [
2 {
3 "description": "validation of IP addresses",
4 "schema": {
5 "$schema": "https://json-schema.org/draft/2019-09/schema",
6 "format": "ipv4"
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 IP address",
62 "data": "192.168.0.1",
63 "valid": true,
64 "skip": {
65 "v3-roundtrip": "could not extract schema"
66 }
67 },
68 {
69 "description": "an IP address with too many components",
70 "data": "127.0.0.0.1",
71 "valid": false,
72 "skip": {
73 "v3": "unexpected success",
74 "v3-roundtrip": "could not extract schema"
75 }
76 },
77 {
78 "description": "an IP address with out-of-range values",
79 "data": "256.256.256.256",
80 "valid": false,
81 "skip": {
82 "v3": "unexpected success",
83 "v3-roundtrip": "could not extract schema"
84 }
85 },
86 {
87 "description": "an IP address without 4 components",
88 "data": "127.0",
89 "valid": false,
90 "skip": {
91 "v3": "unexpected success",
92 "v3-roundtrip": "could not extract schema"
93 }
94 },
95 {
96 "description": "an IP address as an integer",
97 "data": "0x7f000001",
98 "valid": false,
99 "skip": {
100 "v3": "unexpected success",
101 "v3-roundtrip": "could not extract schema"
102 }
103 },
104 {
105 "description": "an IP address as an integer (decimal)",
106 "data": "2130706433",
107 "valid": false,
108 "skip": {
109 "v3": "unexpected success",
110 "v3-roundtrip": "could not extract schema"
111 }
112 },
113 {
114 "description": "invalid leading zeroes, as they are treated as octals",
115 "comment": "see https://sick.codes/universal-netmask-npm-package-used-by-270000-projects-vulnerable-to-octal-input-data-server-side-request-forgery-remote-file-inclusion-local-file-inclusion-and-more-cve-2021-28918/",
116 "data": "087.10.0.1",
117 "valid": false,
118 "skip": {
119 "v3": "unexpected success",
120 "v3-roundtrip": "could not extract schema"
121 }
122 },
123 {
124 "description": "value without leading zero is valid",
125 "data": "87.10.0.1",
126 "valid": true,
127 "skip": {
128 "v3-roundtrip": "could not extract schema"
129 }
130 },
131 {
132 "description": "invalid non-ASCII '২' (a Bengali 2)",
133 "data": "1২7.0.0.1",
134 "valid": false,
135 "skip": {
136 "v3": "unexpected success",
137 "v3-roundtrip": "could not extract schema"
138 }
139 },
140 {
141 "description": "netmask is not a part of ipv4 address",
142 "data": "192.168.1.0/24",
143 "valid": false,
144 "skip": {
145 "v3": "unexpected success",
146 "v3-roundtrip": "could not extract schema"
147 }
148 }
149 ]
150 }
151 ]