Skip to content

{"format":"uri"} doesn't seem to be used #713

@skandragon

Description

@skandragon

I have a schema defined as:

    submit_log_schema = {
        "type": "object",
        "required": ["v1Location", "v2Location", "resultPrefix", "algorithm"],
        "additionalProperties": False,
        "properties": {
            "v1Location": {"type": "string", "format": "uri"},
            "v2Location": {"type": "string", "format": "uri"},
            "resultPrefix": {"type": "string", "format": "uri"},
            "algorithm": {"type": "string", "enum": ["spell"]}
        }
    }

When I validate against this, if one of the 'uri' format strings is not a URI, it still passes validation.

Examples: empty string, or '-123' -- either the URI spec is so loose I'm not coming up with examples, or I have something configured incorrectly.

I do have rfc3987 installed. I'm using jsonschema 3.2.0 (via pip install jsonschema[format])

Metadata

Metadata

Assignees

No one assigned

    Labels

    InvalidNot a bug, PEBKAC, or an unsupported setup

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions