Debian Codegraph @

share/tests/draft2020-12/optional/format/iri.json

raw
1 [
2 {
3 "description": "validation of IRIs",
4 "schema": {
5 "$schema": "https://json-schema.org/draft/2020-12/schema",
6 "format": "iri"
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 IRI with anchor tag",
41 "data": "http://ƒøø.ßår/?∂éœ=πîx#πîüx",
42 "valid": true
43 },
44 {
45 "description": "a valid IRI with anchor tag and parentheses",
46 "data": "http://ƒøø.com/blah_(wîkïpédiå)_blah#ßité-1",
47 "valid": true
48 },
49 {
50 "description": "a valid IRI with URL-encoded stuff",
51 "data": "http://ƒøø.ßår/?q=Test%20URL-encoded%20stuff",
52 "valid": true
53 },
54 {
55 "description": "invalid percent-encoding with non-hex digits",
56 "data": "http://ƒøø.ßår/%6G",
57 "valid": false
58 },
59 {
60 "description": "incomplete percent-encoding triplet",
61 "data": "http://ƒøø.ßår/%A",
62 "valid": false
63 },
64 {
65 "description": "lone percent sign is invalid",
66 "data": "http://ƒøø.ßår/%",
67 "valid": false
68 },
69 {
70 "description": "a valid IRI with many special characters",
71 "data": "http://-.~_!$&'()*+,;=:%40:80%2f::::::@example.com",
72 "valid": true
73 },
74 {
75 "description": "a valid IRI based on IPv6",
76 "data": "http://[2001:0db8:85a3:0000:0000:8a2e:0370:7334]",
77 "valid": true
78 },
79 {
80 "description": "an IPv6 address without enclosing brackets is invalid",
81 "data": "http://2001:0db8:85a3:0000:0000:8a2e:0370:7334",
82 "valid": false
83 },
84 {
85 "description": "an invalid relative IRI Reference",
86 "data": "/abc",
87 "valid": false
88 },
89 {
90 "description": "an invalid IRI",
91 "data": "\\\\WINDOWS\\filëßåré",
92 "valid": false
93 },
94 {
95 "description": "an invalid IRI though valid IRI reference",
96 "data": "âππ",
97 "valid": false
98 },
99 {
100 "description": "an IPv6 host whose embedded IPv4 has a leading zero is invalid",
101 "data": "http://[::ffff:192.168.0.01]",
102 "valid": false
103 },
104 {
105 "description": "a valid IRI with a compressed IPv6 host",
106 "data": "http://[2001:db8::1]",
107 "valid": true
108 },
109 {
110 "description": "a trailing newline after a valid IRI is invalid",
111 "data": "http://ƒøø.ßår/\n",
112 "valid": false
113 },
114 {
115 "description": "an IPvFuture host with an uppercase version letter is valid",
116 "data": "http://[V1.fe]",
117 "valid": true
118 },
119 {
120 "description": "a valid IRI with an IPv4 host",
121 "data": "http://192.168.0.1/p",
122 "valid": true
123 },
124 {
125 "description": "a valid IRI with no authority and a rootless path",
126 "data": "urn:example:resource",
127 "valid": true
128 },
129 {
130 "description": "a valid IRI with no authority and an absolute path",
131 "data": "file:/etc/hosts",
132 "valid": true
133 },
134 {
135 "description": "a valid IRI with a supplementary-plane character in the path",
136 "data": "http://ƒøø.ßår/𐌀",
137 "valid": true
138 },
139 {
140 "description": "a valid IRI with a supplementary-plane private-use char in query",
141 "data": "http://ƒøø.ßår/?q=󰀀",
142 "valid": true
143 }
144 ]
145 }
146 ]