...

Text file src/github.com/qri-io/jsonschema/testdata/meta/validation.json

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

     1{
     2    "$schema": "https://json-schema.org/draft/2019-09/schema",
     3    "$id": "https://json-schema.org/draft/2019-09/meta/validation",
     4    "$vocabulary": {
     5        "https://json-schema.org/draft/2019-09/vocab/validation": true
     6    },
     7    "$recursiveAnchor": true,
     8
     9    "title": "Validation vocabulary meta-schema",
    10    "type": ["object", "boolean"],
    11    "properties": {
    12        "multipleOf": {
    13            "type": "number",
    14            "exclusiveMinimum": 0
    15        },
    16        "maximum": {
    17            "type": "number"
    18        },
    19        "exclusiveMaximum": {
    20            "type": "number"
    21        },
    22        "minimum": {
    23            "type": "number"
    24        },
    25        "exclusiveMinimum": {
    26            "type": "number"
    27        },
    28        "maxLength": { "$ref": "#/$defs/nonNegativeInteger" },
    29        "minLength": { "$ref": "#/$defs/nonNegativeIntegerDefault0" },
    30        "pattern": {
    31            "type": "string",
    32            "format": "regex"
    33        },
    34        "maxItems": { "$ref": "#/$defs/nonNegativeInteger" },
    35        "minItems": { "$ref": "#/$defs/nonNegativeIntegerDefault0" },
    36        "uniqueItems": {
    37            "type": "boolean",
    38            "default": false
    39        },
    40        "maxContains": { "$ref": "#/$defs/nonNegativeInteger" },
    41        "minContains": {
    42            "$ref": "#/$defs/nonNegativeInteger",
    43            "default": 1
    44        },
    45        "maxProperties": { "$ref": "#/$defs/nonNegativeInteger" },
    46        "minProperties": { "$ref": "#/$defs/nonNegativeIntegerDefault0" },
    47        "required": { "$ref": "#/$defs/stringArray" },
    48        "dependentRequired": {
    49            "type": "object",
    50            "additionalProperties": {
    51                "$ref": "#/$defs/stringArray"
    52            }
    53        },
    54        "const": true,
    55        "enum": {
    56            "type": "array",
    57            "items": true
    58        },
    59        "type": {
    60            "anyOf": [
    61                { "$ref": "#/$defs/simpleTypes" },
    62                {
    63                    "type": "array",
    64                    "items": { "$ref": "#/$defs/simpleTypes" },
    65                    "minItems": 1,
    66                    "uniqueItems": true
    67                }
    68            ]
    69        }
    70    },
    71    "$defs": {
    72        "nonNegativeInteger": {
    73            "type": "integer",
    74            "minimum": 0
    75        },
    76        "nonNegativeIntegerDefault0": {
    77            "$ref": "#/$defs/nonNegativeInteger",
    78            "default": 0
    79        },
    80        "simpleTypes": {
    81            "enum": [
    82                "array",
    83                "boolean",
    84                "integer",
    85                "null",
    86                "number",
    87                "object",
    88                "string"
    89            ]
    90        },
    91        "stringArray": {
    92            "type": "array",
    93            "items": { "type": "string" },
    94            "uniqueItems": true,
    95            "default": []
    96        }
    97    }
    98}

View as plain text