Skip to content

Object title not visible when using if #1650

@JakobRechKeyOne

Description

@JakobRechKeyOne

When using if inside a object, the title of the object is not visible.

Take this schema for example:

{
  "$schema": "http://json-schema.org/2020-12/schema#",
  "type": "object",
  "properties": {
    "user": {
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "admin",
            "user"
          ]
        },
        "adminLevel": {
          "type": "string"
        }
      },
      "required": [
        "type"
      ],
      "if": {
        "properties": {
          "type": {
            "const": "admin"
          }
        }
      },
      "then": {
        "required": [
          "adminLevel"
        ]
      }
    }
  }
}

It results in

Image

as you can see, the title user is not visible.

If we remove the if and then from the schema the title is visible as expected:

Image

Metadata

Metadata

Assignees

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