k8s.io/kube-openapi@v0.0.0-20240228011516-70dd3763d340/pkg/validation/validate/fixtures/jsonschema_suite/format.json (about) 1 [ 2 { 3 "description": "validation of date-time strings", 4 "schema": {"format": "date-time"}, 5 "tests": [ 6 { 7 "description": "a valid date-time string", 8 "data": "1963-06-19T08:30:06.283185Z", 9 "valid": true 10 }, 11 { 12 "description": "an invalid date-time string", 13 "data": "06/19/1963 08:30:06 PST", 14 "valid": false 15 }, 16 { 17 "description": "only RFC3339 not all of ISO 8601 are valid", 18 "data": "2013-350T01:01:01", 19 "valid": false 20 } 21 ] 22 }, 23 { 24 "description": "validation of URIs", 25 "schema": {"format": "uri"}, 26 "tests": [ 27 { 28 "description": "a valid URI", 29 "data": "http://foo.bar/?baz=qux#quux", 30 "valid": true 31 }, 32 { 33 "description": "an invalid URI", 34 "data": "\\\\WINDOWS\\fileshare", 35 "valid": false 36 }, 37 { 38 "description": "an invalid URI though valid URI reference", 39 "data": "abc", 40 "valid": false 41 } 42 ] 43 }, 44 { 45 "description": "validation of e-mail addresses", 46 "schema": {"format": "email"}, 47 "tests": [ 48 { 49 "description": "a valid e-mail address", 50 "data": "joe.bloggs@example.com", 51 "valid": true 52 }, 53 { 54 "description": "an invalid e-mail address", 55 "data": "2962", 56 "valid": false 57 } 58 ] 59 }, 60 { 61 "description": "validation of IP addresses", 62 "schema": {"format": "ipv4"}, 63 "tests": [ 64 { 65 "description": "a valid IP address", 66 "data": "192.168.0.1", 67 "valid": true 68 }, 69 { 70 "description": "an IP address with too many components", 71 "data": "127.0.0.0.1", 72 "valid": false 73 }, 74 { 75 "description": "an IP address with out-of-range values", 76 "data": "256.256.256.256", 77 "valid": false 78 }, 79 { 80 "description": "an IP address without 4 components", 81 "data": "127.0", 82 "valid": false 83 }, 84 { 85 "description": "an IP address as an integer", 86 "data": "0x7f000001", 87 "valid": false 88 } 89 ] 90 }, 91 { 92 "description": "validation of IPv6 addresses", 93 "schema": {"format": "ipv6"}, 94 "tests": [ 95 { 96 "description": "a valid IPv6 address", 97 "data": "::1", 98 "valid": true 99 }, 100 { 101 "description": "an IPv6 address with out-of-range values", 102 "data": "12345::", 103 "valid": false 104 }, 105 { 106 "description": "an IPv6 address with too many components", 107 "data": "1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1", 108 "valid": false 109 }, 110 { 111 "description": "an IPv6 address containing illegal characters", 112 "data": "::laptop", 113 "valid": false 114 } 115 ] 116 }, 117 { 118 "description": "validation of host names", 119 "schema": {"format": "hostname"}, 120 "tests": [ 121 { 122 "description": "a valid host name", 123 "data": "www.example.com", 124 "valid": true 125 }, 126 { 127 "description": "a host name starting with an illegal character", 128 "data": "-a-host-name-that-starts-with--", 129 "valid": false 130 }, 131 { 132 "description": "a host name containing illegal characters", 133 "data": "not_a_valid_host_name", 134 "valid": false 135 }, 136 { 137 "description": "a host name with a component too long", 138 "data": "a-vvvvvvvvvvvvvvvveeeeeeeeeeeeeeeerrrrrrrrrrrrrrrryyyyyyyyyyyyyyyy-long-host-name-component", 139 "valid": false 140 } 141 ] 142 } 143 ]