stoplightio / json-schema-viewer

A JSON Schema viewer React component
Apache License 2.0
175 stars 37 forks source link

Use description property from $ref #256

Open autoantwort opened 6 months ago

autoantwort commented 6 months ago

Context

if i have the following schema:

...
"properties": {
      "compile_features": {
          "$ref": "#/definitions/attributes/compile_features@0"
      },
}
...
"compile_features@0": {
      "description": "Specifies a list of Compiler Features that must be enabled or disabled when compiling code that consumes the component.",
      "$ref": "#/definitions/types/list(string)"
  },

No description is displayed in the ui (VS Code displays the description)

Current Behavior

No description is displayed

Expected Behavior

Description from '$ref' is displayed

Possible Workaround/Solution

Move description attribute

Steps to Reproduce

Use file from https://github.com/cps-org/cps/files/15203794/cps.schema.json Set is as schema here: https://stoplightio.github.io/json-schema-viewer