Skip to content

Description and test case contradiction: unevaluatedProperties #723

Open
@AgniveshChaubey

Description

@AgniveshChaubey

Reference:

"description": "when if is true and has no unevaluated properties",

Schema:

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "if": {
      "properties": {
          "foo": { "const": "then" }
      },
      "required": ["foo"]
  },
  "else": {
      "properties": {
          "baz": { "type": "string" }
      },
      "required": ["baz"]
  },
  "unevaluatedProperties": false
}

Instance:

"tests": [
    {
        "description": "when if is true and has no unevaluated properties",
        "data": {
            "foo": "then",
            "bar": "bar"
        },
        "valid": false
    },
    ...
]

The description of the above test states that it has no unevaluated properties, but isn't the bar property here unevaluated?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA test is wrong, or tooling is broken or buggy.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions