Skip to content

Poor error message when unevaluatedProperties is a schema #996

@Julian

Description

@Julian
from jsonschema.validators import validator_for

schema = {"unevaluatedProperties": {"const": 12}}
print(next(validator_for(schema)(schema).iter_errors({"type": 37})))

produces the misleading:

Unevaluated properties are not allowed ('type' was unexpected)

Failed validating 'unevaluatedProperties' in schema:
    {'unevaluatedProperties': {'const': 12}}

On instance:
    {'type': 37}

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething doesn't work the way it should.Error ReportingIssues related to clearer or more robust validation error reporting

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions