Skip to content

Schema with undefined required properties should not be valid  #692

Closed
@daniwelter

Description

@daniwelter

We have come across the following use case/bug a couple of times recently in the HCA metadata:

During schema edits, properties were removed or renamed but the update was not propagated to the required array. We therefore had properties declared as required that were not defined under properties{}.

These schemas were not flagged as invalid but as all our schemas use additionalProperties:false, no document can be successfully validated against such a schema as it would either be missing a required property or contain an undefined additional property.

We think this logical contradiction should be accounted for in the JSON Schema specification.

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