Debian Codegraph @

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

raw
1 [
2 {
3 "description": "validation of host names",
4 "schema": {
5 "$schema": "https://json-schema.org/draft/2019-09/schema",
6 "format": "hostname"
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 host name",
62 "data": "www.example.com",
63 "valid": true,
64 "skip": {
65 "v3-roundtrip": "could not extract schema"
66 }
67 },
68 {
69 "description": "a valid punycoded IDN hostname",
70 "data": "xn--4gbwdl.xn--wgbh1c",
71 "valid": true,
72 "skip": {
73 "v3-roundtrip": "could not extract schema"
74 }
75 },
76 {
77 "description": "a host name starting with an illegal character",
78 "data": "-a-host-name-that-starts-with--",
79 "valid": false,
80 "skip": {
81 "v3": "unexpected success",
82 "v3-roundtrip": "could not extract schema"
83 }
84 },
85 {
86 "description": "a host name containing illegal characters",
87 "data": "not_a_valid_host_name",
88 "valid": false,
89 "skip": {
90 "v3": "unexpected success",
91 "v3-roundtrip": "could not extract schema"
92 }
93 },
94 {
95 "description": "a host name with a component too long",
96 "data": "a-vvvvvvvvvvvvvvvveeeeeeeeeeeeeeeerrrrrrrrrrrrrrrryyyyyyyyyyyyyyyy-long-host-name-component",
97 "valid": false,
98 "skip": {
99 "v3": "unexpected success",
100 "v3-roundtrip": "could not extract schema"
101 }
102 },
103 {
104 "description": "starts with hyphen",
105 "data": "-hostname",
106 "valid": false,
107 "skip": {
108 "v3": "unexpected success",
109 "v3-roundtrip": "could not extract schema"
110 }
111 },
112 {
113 "description": "ends with hyphen",
114 "data": "hostname-",
115 "valid": false,
116 "skip": {
117 "v3": "unexpected success",
118 "v3-roundtrip": "could not extract schema"
119 }
120 },
121 {
122 "description": "starts with underscore",
123 "data": "_hostname",
124 "valid": false,
125 "skip": {
126 "v3": "unexpected success",
127 "v3-roundtrip": "could not extract schema"
128 }
129 },
130 {
131 "description": "ends with underscore",
132 "data": "hostname_",
133 "valid": false,
134 "skip": {
135 "v3": "unexpected success",
136 "v3-roundtrip": "could not extract schema"
137 }
138 },
139 {
140 "description": "contains underscore",
141 "data": "host_name",
142 "valid": false,
143 "skip": {
144 "v3": "unexpected success",
145 "v3-roundtrip": "could not extract schema"
146 }
147 },
148 {
149 "description": "maximum label length",
150 "data": "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijk.com",
151 "valid": true,
152 "skip": {
153 "v3-roundtrip": "could not extract schema"
154 }
155 },
156 {
157 "description": "exceeds maximum label length",
158 "data": "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijkl.com",
159 "valid": false,
160 "skip": {
161 "v3": "unexpected success",
162 "v3-roundtrip": "could not extract schema"
163 }
164 },
165 {
166 "description": "single label",
167 "data": "hostname",
168 "valid": true,
169 "skip": {
170 "v3-roundtrip": "could not extract schema"
171 }
172 },
173 {
174 "description": "single label with hyphen",
175 "data": "host-name",
176 "valid": true,
177 "skip": {
178 "v3-roundtrip": "could not extract schema"
179 }
180 },
181 {
182 "description": "single label with digits",
183 "data": "h0stn4me",
184 "valid": true,
185 "skip": {
186 "v3-roundtrip": "could not extract schema"
187 }
188 },
189 {
190 "description": "single label starting with digit",
191 "data": "1host",
192 "valid": true,
193 "skip": {
194 "v3-roundtrip": "could not extract schema"
195 }
196 },
197 {
198 "description": "single label ending with digit",
199 "data": "hostnam3",
200 "valid": true,
201 "skip": {
202 "v3-roundtrip": "could not extract schema"
203 }
204 }
205 ]
206 }
207 ]