Skip to content

jsonschema validates against instances with unspecified properties #160

@theambient

Description

@theambient

this works but i expect an error: prop2 is not in scheme.

from jsonschema import validate

schema = {
    "prop1" :
    {
        "type" : "string"
    },
    "required" : ["prop1"]
}

instance = {
    "prop1" : "my string",
    "prop2" : 5
}

validate(instance, schema)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions