Skip to content

Markdown description will not be rendered when the property has any reference #1223

@rH4rtinger

Description

@rH4rtinger

Describe the bug

I have used a simple schema with two properties. Both properties has an normal description and a markdown description.
Mybar property has a reference to an definition.

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "foo": {
      "type": "string",
      "title": "foo title",
      "description": "foo desc",
      "markdownDescription": "foo md desc **bold** \n * line \n* another \n\n"
    },
    "bar": {
      "$ref": "#/$defs/veggie",
      "title": "bar title",
      "description": "bar desc",
      "markdownDescription": "bar md desc **bold** \n * line \n* another \n\n"
    }
  },
  "$defs": {
    "veggie": {
      "type": "string",
      "enum": [
        "potato",
        "carrot"
      ]
    }
  }
}

When I am using this schema in VS Code and looking at the documentation of both properties

  • foo is getting the markdown description (correct)
Image
  • bar is displaying its normal description despite having a markdown description (incorrect)
Image

Expected Behavior

I expect that any given markdown description will always beat the normal description and will be always rendered.

Current Behavior

The markdown description of an property with an ref element was not rendered, but instead the normal description.

Steps to Reproduce

  1. Use the schema given above in VS Code in an file
  2. Preview the description of foo -> markdown -> correct
  3. Preview the description of bar -> no markdown -> incorrect

Environment

  • Windows
  • Mac
  • Linux
  • other (please specify)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions