Skip to content

Root definitions do not display details if not "type" == "object" #36

@bmaranville

Description

@bmaranville

If a subschema has been defined that does not have an explicit or implicit type "object", the viewer shows only the description for that subschema when it is clicked in the "Root definitions" tree. It would be nice if the viewer was able to display subschemas of type "enum", "string", etc.

E.g. for this schema:

 {
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "id",
  "title": "Orso",
  "type": "object",
  "properties": {},
  "definitions": {
    "Polarization": {
      "title": "Polarization",
      "description": "The first symbol indicates the magnetisation direction of the incident beam (or o for unknown polarization).\n\nThe second symbol indicates the direction of the scattered beam (or o for unknown polarization).",
      "enum": [
        "unpolarized",
        "po",
        "mo",
        "op",
        "om",
        "mm",
        "mp",
        "pm",
        "pp"
      ]
    }
  }
}

The view when clicking on "Polarization" is this:
image

But I'd like it to be this:
image

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