Skip to content

Support rules in array items? #39

@yskeat

Description

@yskeat

Is there a way to support more detail rules in array items?

I wish to have an array of UUID which the json schema will look like this:

{
    "ids": {
        "type": "array",
        "minItems": 1,
        "items": {
            "type": "string",
            "pattern": "/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i"
        }
    }
}

and an array of string and boolean in an array like this:

{
    "order": {
        "type": "array",
        "minItems": 1,
        "items": {
            "type": "array",
            "minItems": 2,
            "maxItems": 2,
            "items": [{
                "type": "string"
            }, {
                "type": "boolean"
            }]
        }
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions