Skip to content

unevaluatedProperties should not affect sub-schemas #826

Closed
@aznan2

Description

@aznan2

unevaluatedProperties gets its set of evaluated properties from adjacent properties, patternProperties, additionalProperties and unevaluatedProperties . This means that unevaluated properties from sub-schemas should not be considered. That is, given this schema:

{
  "$schema": "https://json-schema.org/draft/2019-09/schema",
  "properties": {
    "foo": {}
  },
  "unevaluatedProperties": false
}

the following instance should be valid:

{
  "foo": {
    "bar": "baz"
  }
}

This is currently not the case - if "unevaluatedProperties": false is set at the root of a schema, then any deeply nested additional property will result in a validation error.

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