Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support rules in array items? #39

Open
yskeat opened this issue Oct 26, 2015 · 0 comments
Open

Support rules in array items? #39

yskeat opened this issue Oct 26, 2015 · 0 comments

Comments

@yskeat
Copy link

yskeat commented Oct 26, 2015

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"
            }]
        }
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant