cuelang.org/go@v0.13.0/encoding/jsonschema/testdata/external/tests/draft4/optional/format/uri.json (about)

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