Debian Codegraph @

encoding/jsonschema/testdata/external/tests/draft2020-12/optional/format/uri.json

raw
1 [
2 {
3 "description": "validation of URIs",
4 "schema": {
5 "$schema": "https://json-schema.org/draft/2020-12/schema",
6 "format": "uri"
7 },
8 "tests": [
9 {
10 "description": "all string formats ignore integers",
11 "data": 12,
12 "valid": true
13 },
14 {
15 "description": "all string formats ignore floats",
16 "data": 13.7,
17 "valid": true
18 },
19 {
20 "description": "all string formats ignore objects",
21 "data": {},
22 "valid": true
23 },
24 {
25 "description": "all string formats ignore arrays",
26 "data": [],
27 "valid": true
28 },
29 {
30 "description": "all string formats ignore booleans",
31 "data": false,
32 "valid": true
33 },
34 {
35 "description": "all string formats ignore nulls",
36 "data": null,
37 "valid": true
38 },
39 {
40 "description": "a valid URL with anchor tag",
41 "data": "http://foo.bar/?baz=qux#quux",
42 "valid": true
43 },
44 {
45 "description": "a valid URL with anchor tag and parentheses",
46 "data": "http://foo.com/blah_(wikipedia)_blah#cite-1",
47 "valid": true
48 },
49 {
50 "description": "a valid URL with URL-encoded stuff",
51 "data": "http://foo.bar/?q=Test%20URL-encoded%20stuff",
52 "valid": true
53 },
54 {
55 "description": "a valid puny-coded URL ",
56 "data": "http://xn--nw2a.xn--j6w193g/",
57 "valid": true
58 },
59 {
60 "description": "a valid URL with many special characters",
61 "data": "http://-.~_!$\u0026'()*+,;=:%40:80%2f::::::@example.com",
62 "valid": true
63 },
64 {
65 "description": "a valid URL based on IPv4",
66 "data": "http://223.255.255.254",
67 "valid": true
68 },
69 {
70 "description": "a valid URL with ftp scheme",
71 "data": "ftp://ftp.is.co.za/rfc/rfc1808.txt",
72 "valid": true
73 },
74 {
75 "description": "a valid URL for a simple text file",
76 "data": "http://www.ietf.org/rfc/rfc2396.txt",
77 "valid": true
78 },
79 {
80 "description": "a valid URL ",
81 "data": "ldap://[2001:db8::7]/c=GB?objectClass?one",
82 "valid": true
83 },
84 {
85 "description": "a valid mailto URI",
86 "data": "mailto:[email protected]",
87 "valid": true
88 },
89 {
90 "description": "a valid newsgroup URI",
91 "data": "news:comp.infosystems.www.servers.unix",
92 "valid": true
93 },
94 {
95 "description": "a valid tel URI",
96 "data": "tel:+1-816-555-1212",
97 "valid": true
98 },
99 {
100 "description": "a valid URN",
101 "data": "urn:oasis:names:specification:docbook:dtd:xml:4.1.2",
102 "valid": true
103 },
104 {
105 "description": "an invalid protocol-relative URI Reference",
106 "data": "//foo.bar/?baz=qux#quux",
107 "valid": false,
108 "skip": {
109 "v3-roundtrip": "unexpected success"
110 }
111 },
112 {
113 "description": "an invalid relative URI Reference",
114 "data": "/abc",
115 "valid": false,
116 "skip": {
117 "v3-roundtrip": "unexpected success"
118 }
119 },
120 {
121 "description": "an invalid URI",
122 "data": "\\\\WINDOWS\\fileshare",
123 "valid": false,
124 "skip": {
125 "v3-roundtrip": "unexpected success"
126 }
127 },
128 {
129 "description": "an invalid URI though valid URI reference",
130 "data": "abc",
131 "valid": false,
132 "skip": {
133 "v3-roundtrip": "unexpected success"
134 }
135 },
136 {
137 "description": "an invalid URI with spaces",
138 "data": "http:// shouldfail.com",
139 "valid": false,
140 "skip": {
141 "v3-roundtrip": "unexpected success"
142 }
143 },
144 {
145 "description": "an invalid URI with spaces and missing scheme",
146 "data": ":// should fail",
147 "valid": false,
148 "skip": {
149 "v3-roundtrip": "unexpected success"
150 }
151 },
152 {
153 "description": "an invalid URI with comma in scheme",
154 "data": "bar,baz:foo",
155 "valid": false,
156 "skip": {
157 "v3-roundtrip": "unexpected success"
158 }
159 }
160 ]
161 }
162 ]