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

     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:John.Doe@example.com",
    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  			},
   109  			{
   110  				"description": "an invalid relative URI Reference",
   111  				"data": "/abc",
   112  				"valid": false
   113  			},
   114  			{
   115  				"description": "an invalid URI",
   116  				"data": "\\\\WINDOWS\\fileshare",
   117  				"valid": false
   118  			},
   119  			{
   120  				"description": "an invalid URI though valid URI reference",
   121  				"data": "abc",
   122  				"valid": false
   123  			},
   124  			{
   125  				"description": "an invalid URI with spaces",
   126  				"data": "http:// shouldfail.com",
   127  				"valid": false
   128  			},
   129  			{
   130  				"description": "an invalid URI with spaces and missing scheme",
   131  				"data": ":// should fail",
   132  				"valid": false
   133  			},
   134  			{
   135  				"description": "an invalid URI with comma in scheme",
   136  				"data": "bar,baz:foo",
   137  				"valid": false
   138  			}
   139  		]
   140  	}
   141  ]