...

Text file src/github.com/qri-io/jsonschema/testdata/draft7/optional/format/ipv4.json

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

     1[
     2    {
     3        "description": "validation of IP addresses",
     4        "schema": {"format": "ipv4"},
     5        "tests": [
     6            {
     7                "description": "a valid IP address",
     8                "data": "192.168.0.1",
     9                "valid": true
    10            },
    11            {
    12                "description": "an IP address with too many components",
    13                "data": "127.0.0.0.1",
    14                "valid": false
    15            },
    16            {
    17                "description": "an IP address with out-of-range values",
    18                "data": "256.256.256.256",
    19                "valid": false
    20            },
    21            {
    22                "description": "an IP address without 4 components",
    23                "data": "127.0",
    24                "valid": false
    25            },
    26            {
    27                "description": "an IP address as an integer",
    28                "data": "0x7f000001",
    29                "valid": false
    30            }
    31        ]
    32    }
    33]

View as plain text