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