...

Text file src/github.com/qri-io/jsonschema/testdata/draft2019-09/optional/format/uri.json

Documentation: github.com/qri-io/jsonschema/testdata/draft2019-09/optional/format

     1[
     2    {
     3        "description": "validation of URIs",
     4        "schema": {"format": "uri"},
     5        "tests": [
     6            {
     7                "description": "a valid URL with anchor tag",
     8                "data": "http://foo.bar/?baz=qux#quux",
     9                "valid": true
    10            },
    11            {
    12                "description": "a valid URL with anchor tag and parantheses",
    13                "data": "http://foo.com/blah_(wikipedia)_blah#cite-1",
    14                "valid": true
    15            },
    16            {
    17                "description": "a valid URL with URL-encoded stuff",
    18                "data": "http://foo.bar/?q=Test%20URL-encoded%20stuff",
    19                "valid": true
    20            },
    21            {
    22                "description": "a valid puny-coded URL ",
    23                "data": "http://xn--nw2a.xn--j6w193g/",
    24                "valid": true
    25            },
    26            {
    27                "description": "a valid URL with many special characters",
    28                "data": "http://-.~_!$&'()*+,;=:%40:80%2f::::::@example.com",
    29                "valid": true
    30            },
    31            {
    32                "description": "a valid URL based on IPv4",
    33                "data": "http://223.255.255.254",
    34                "valid": true
    35            },
    36            {
    37                "description": "a valid URL with ftp scheme",
    38                "data": "ftp://ftp.is.co.za/rfc/rfc1808.txt",
    39                "valid": true
    40            },
    41            {
    42                "description": "a valid URL for a simple text file",
    43                "data": "http://www.ietf.org/rfc/rfc2396.txt",
    44                "valid": true
    45            },
    46            {
    47                "description": "a valid URL ",
    48                "data": "ldap://[2001:db8::7]/c=GB?objectClass?one",
    49                "valid": true
    50            },
    51            {
    52                "description": "a valid mailto URI",
    53                "data": "mailto:John.Doe@example.com",
    54                "valid": true
    55            },
    56            {
    57                "description": "a valid newsgroup URI",
    58                "data": "news:comp.infosystems.www.servers.unix",
    59                "valid": true
    60            },
    61            {
    62                "description": "a valid tel URI",
    63                "data": "tel:+1-816-555-1212",
    64                "valid": true
    65            },
    66            {
    67                "description": "a valid URN",
    68                "data": "urn:oasis:names:specification:docbook:dtd:xml:4.1.2",
    69                "valid": true
    70            },
    71            {
    72                "description": "an invalid protocol-relative URI Reference",
    73                "data": "//foo.bar/?baz=qux#quux",
    74                "valid": false
    75            },
    76            {
    77                "description": "an invalid relative URI Reference",
    78                "data": "/abc",
    79                "valid": false
    80            },
    81            {
    82                "description": "an invalid URI",
    83                "data": "\\\\WINDOWS\\fileshare",
    84                "valid": false
    85            },
    86            {
    87                "description": "an invalid URI though valid URI reference",
    88                "data": "abc",
    89                "valid": false
    90            },
    91            {
    92                "description": "an invalid URI with spaces",
    93                "data": "http:// shouldfail.com",
    94                "valid": false
    95            },
    96            {
    97                "description": "an invalid URI with spaces and missing scheme",
    98                "data": ":// should fail",
    99                "valid": false
   100            }
   101        ]
   102    }
   103]

View as plain text