-
-
Notifications
You must be signed in to change notification settings - Fork 272
Expand file tree
/
Copy pathuri.json
More file actions
221 lines (221 loc) · 7.37 KB
/
uri.json
File metadata and controls
221 lines (221 loc) · 7.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
[
{
"description": "validation of URIs",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"format": "uri"
},
"tests": [
{
"description": "all string formats ignore integers",
"data": 12,
"valid": true
},
{
"description": "all string formats ignore floats",
"data": 13.7,
"valid": true
},
{
"description": "all string formats ignore objects",
"data": {},
"valid": true
},
{
"description": "all string formats ignore arrays",
"data": [],
"valid": true
},
{
"description": "all string formats ignore booleans",
"data": false,
"valid": true
},
{
"description": "all string formats ignore nulls",
"data": null,
"valid": true
},
{
"description": "a valid URL with anchor tag",
"data": "http://foo.bar/?baz=qux#quux",
"valid": true
},
{
"description": "a valid URL with anchor tag and parentheses",
"data": "http://foo.com/blah_(wikipedia)_blah#cite-1",
"valid": true
},
{
"description": "a valid URL with URL-encoded stuff",
"data": "http://foo.bar/?q=Test%20URL-encoded%20stuff",
"valid": true
},
{
"description": "a valid puny-coded URL ",
"data": "http://xn--nw2a.xn--j6w193g/",
"valid": true
},
{
"description": "a valid URL with many special characters",
"data": "http://-.~_!$&'()*+,;=:%40:80%2f::::::@example.com",
"valid": true
},
{
"description": "a valid URL based on IPv4",
"data": "http://223.255.255.254",
"valid": true
},
{
"description": "a valid URL with ftp scheme",
"data": "ftp://ftp.is.co.za/rfc/rfc1808.txt",
"valid": true
},
{
"description": "a valid URL for a simple text file",
"data": "http://www.ietf.org/rfc/rfc2396.txt",
"valid": true
},
{
"description": "a valid URL ",
"data": "ldap://[2001:db8::7]/c=GB?objectClass?one",
"valid": true
},
{
"description": "a valid mailto URI",
"data": "mailto:John.Doe@example.com",
"valid": true
},
{
"description": "a valid newsgroup URI",
"data": "news:comp.infosystems.www.servers.unix",
"valid": true
},
{
"description": "a valid tel URI",
"data": "tel:+1-816-555-1212",
"valid": true
},
{
"description": "a valid URN",
"data": "urn:oasis:names:specification:docbook:dtd:xml:4.1.2",
"valid": true
},
{
"description": "an invalid protocol-relative URI Reference",
"data": "//foo.bar/?baz=qux#quux",
"valid": false
},
{
"description": "an invalid relative URI Reference",
"data": "/abc",
"valid": false
},
{
"description": "an invalid URI",
"data": "\\\\WINDOWS\\fileshare",
"valid": false
},
{
"description": "an invalid URI though valid URI reference",
"data": "abc",
"valid": false
},
{
"description": "an invalid URI with spaces",
"data": "http:// shouldfail.com",
"valid": false
},
{
"description": "an invalid URI with spaces and missing scheme",
"data": ":// should fail",
"valid": false
},
{
"description": "an invalid URI with comma in scheme",
"data": "bar,baz:foo",
"valid": false
},
{
"description": "invalid userinfo",
"data": "https://[@example.org/test.txt",
"valid": false
},
{
"description": "unescaped non US-ASCII characters",
"data": "https://example.org/foobar®.txt",
"valid": false
},
{
"description": "invalid backslash character",
"data": "https://example.org/foobar\\.txt",
"valid": false
},
{
"description": "invalid \" character",
"data": "https://example.org/foobar\".txt",
"valid": false
},
{
"description": "invalid <> characters",
"data": "https://example.org/foobar<>.txt",
"valid": false
},
{
"description": "invalid {} characters",
"data": "https://example.org/foobar{}.txt",
"valid": false
},
{
"description": "invalid ^ character",
"data": "https://example.org/foobar^.txt",
"valid": false
},
{
"description": "invalid ` character",
"data": "https://example.org/foobar`.txt",
"valid": false
},
{
"description": "invalid SPACE character",
"data": "https://example.org/foo bar.txt",
"valid": false
},
{
"description": "invalid | character",
"data": "https://example.org/foobar|.txt",
"valid": false
},
{
"description": "invalid percent-encoding with non-hex digits",
"data": "http://example.com/%GG",
"valid": false
},
{
"description": "incomplete percent-encoding triplet",
"data": "http://example.com/%A",
"valid": false
},
{
"description": "lone percent sign is invalid",
"data": "http://example.com/%",
"valid": false
},
{
"description": "scheme must start with a letter",
"data": "1http://example.com",
"valid": false
},
{
"description": "invalid character in scheme",
"data": "ht_tp://example.com",
"valid": false
},
{
"description": "non-numeric port is invalid",
"data": "http://example.com:abc/path",
"valid": false
}
]
}
]