...

Text file src/github.com/qri-io/jsonschema/testdata/draft3/disallow.json

Documentation: github.com/qri-io/jsonschema/testdata/draft3

     1[
     2    {
     3        "description": "disallow",
     4        "schema": {
     5            "disallow": "integer"
     6        },
     7        "tests": [
     8            {
     9                "description": "allowed",
    10                "data": "foo",
    11                "valid": true
    12            },
    13            {
    14                "description": "disallowed",
    15                "data": 1,
    16                "valid": false
    17            }
    18        ]
    19    },
    20    {
    21        "description": "multiple disallow",
    22        "schema": {
    23            "disallow": ["integer", "boolean"]
    24        },
    25        "tests": [
    26            {
    27                "description": "valid",
    28                "data": "foo",
    29                "valid": true
    30            },
    31            {
    32                "description": "mismatch",
    33                "data": 1,
    34                "valid": false
    35            },
    36            {
    37                "description": "other mismatch",
    38                "data": true,
    39                "valid": false
    40            }
    41        ]
    42    },
    43    {
    44        "description": "multiple disallow subschema",
    45        "schema": {
    46            "disallow":
    47                ["string",
    48                 {
    49                    "type": "object",
    50                    "properties": {
    51                        "foo": {
    52                            "type": "string"
    53                        }
    54                    }
    55                 }]
    56        },
    57        "tests": [
    58            {
    59                "description": "match",
    60                "data": 1,
    61                "valid": true
    62            },
    63            {
    64                "description": "other match",
    65                "data": {"foo": 1},
    66                "valid": true
    67            },
    68            {
    69                "description": "mismatch",
    70                "data": "foo",
    71                "valid": false
    72            },
    73            {
    74                "description": "other mismatch",
    75                "data": {"foo": "bar"},
    76                "valid": false
    77            }
    78        ]
    79    }
    80]

View as plain text