github.com/kaptinlin/jsonschema@v0.4.6/testdata/JSON-Schema-Test-Suite/tests/draft6/optional/format/ipv6.json (about)

     1  [
     2      {
     3          "description": "validation of IPv6 addresses",
     4          "schema": { "format": "ipv6" },
     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 IPv6 address",
    38                  "data": "::1",
    39                  "valid": true
    40              },
    41              {
    42                  "description": "an IPv6 address with out-of-range values",
    43                  "data": "12345::",
    44                  "valid": false
    45              },
    46              {
    47                  "description": "trailing 4 hex symbols is valid",
    48                  "data": "::abef",
    49                  "valid": true
    50              },
    51              {
    52                  "description": "trailing 5 hex symbols is invalid",
    53                  "data": "::abcef",
    54                  "valid": false
    55              },
    56              {
    57                  "description": "an IPv6 address with too many components",
    58                  "data": "1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1",
    59                  "valid": false
    60              },
    61              {
    62                  "description": "an IPv6 address containing illegal characters",
    63                  "data": "::laptop",
    64                  "valid": false
    65              },
    66              {
    67                  "description": "no digits is valid",
    68                  "data": "::",
    69                  "valid": true
    70              },
    71              {
    72                  "description": "leading colons is valid",
    73                  "data": "::42:ff:1",
    74                  "valid": true
    75              },
    76              {
    77                  "description": "trailing colons is valid",
    78                  "data": "d6::",
    79                  "valid": true
    80              },
    81              {
    82                  "description": "missing leading octet is invalid",
    83                  "data": ":2:3:4:5:6:7:8",
    84                  "valid": false
    85              },
    86              {
    87                  "description": "missing trailing octet is invalid",
    88                  "data": "1:2:3:4:5:6:7:",
    89                  "valid": false
    90              },
    91              {
    92                  "description": "missing leading octet with omitted octets later",
    93                  "data": ":2:3:4::8",
    94                  "valid": false
    95              },
    96              {
    97                  "description": "single set of double colons in the middle is valid",
    98                  "data": "1:d6::42",
    99                  "valid": true
   100              },
   101              {
   102                  "description": "two sets of double colons is invalid",
   103                  "data": "1::d6::42",
   104                  "valid": false
   105              },
   106              {
   107                  "description": "mixed format with the ipv4 section as decimal octets",
   108                  "data": "1::d6:192.168.0.1",
   109                  "valid": true
   110              },
   111              {
   112                  "description": "mixed format with double colons between the sections",
   113                  "data": "1:2::192.168.0.1",
   114                  "valid": true
   115              },
   116              {
   117                  "description": "mixed format with ipv4 section with octet out of range",
   118                  "data": "1::2:192.168.256.1",
   119                  "valid": false
   120              },
   121              {
   122                  "description": "mixed format with ipv4 section with a hex octet",
   123                  "data": "1::2:192.168.ff.1",
   124                  "valid": false
   125              },
   126              {
   127                  "description": "mixed format with leading double colons (ipv4-mapped ipv6 address)",
   128                  "data": "::ffff:192.168.0.1",
   129                  "valid": true
   130              },
   131              {
   132                  "description": "triple colons is invalid",
   133                  "data": "1:2:3:4:5:::8",
   134                  "valid": false
   135              },
   136              {
   137                  "description": "8 octets",
   138                  "data": "1:2:3:4:5:6:7:8",
   139                  "valid": true
   140              },
   141              {
   142                  "description": "insufficient octets without double colons",
   143                  "data": "1:2:3:4:5:6:7",
   144                  "valid": false
   145              },
   146              {
   147                  "description": "no colons is invalid",
   148                  "data": "1",
   149                  "valid": false
   150              },
   151              {
   152                  "description": "ipv4 is not ipv6",
   153                  "data": "127.0.0.1",
   154                  "valid": false
   155              },
   156              {
   157                  "description": "ipv4 segment must have 4 octets",
   158                  "data": "1:2:3:4:1.2.3",
   159                  "valid": false
   160              },
   161              {
   162                  "description": "leading whitespace is invalid",
   163                  "data": "  ::1",
   164                  "valid": false
   165              },
   166              {
   167                  "description": "trailing whitespace is invalid",
   168                  "data": "::1  ",
   169                  "valid": false
   170              },
   171              {
   172                  "description": "netmask is not a part of ipv6 address",
   173                  "data": "fe80::/64",
   174                  "valid": false
   175              },
   176              {
   177                  "description": "zone id is not a part of ipv6 address",
   178                  "data": "fe80::a%eth1",
   179                  "valid": false
   180              },
   181              {
   182                  "description": "a long valid ipv6",
   183                  "data": "1000:1000:1000:1000:1000:1000:255.255.255.255",
   184                  "valid": true
   185              },
   186              {
   187                  "description": "a long invalid ipv6, below length limit, first",
   188                  "data": "100:100:100:100:100:100:255.255.255.255.255",
   189                  "valid": false
   190              },
   191              {
   192                  "description": "a long invalid ipv6, below length limit, second",
   193                  "data": "100:100:100:100:100:100:100:255.255.255.255",
   194                  "valid": false
   195              },
   196              {
   197                  "description": "invalid non-ASCII '৪' (a Bengali 4)",
   198                  "data": "1:2:3:4:5:6:7:৪",
   199                  "valid": false
   200              },
   201              {
   202                  "description": "invalid non-ASCII '৪' (a Bengali 4) in the IPv4 portion",
   203                  "data": "1:2::192.16৪.0.1",
   204                  "valid": false
   205              }
   206          ]
   207      }
   208  ]