vscode-yaml
vscode-yaml copied to clipboard
Add support for markdown in property description
On completion and hover on a property, it would be great that displayed description is rendered using markdown renderer (based on "description" property in json schema),
This can already be achieved by using the "markdownDescription"
field instead of the "description"
field. However, I would like to store a markdown description in the "description"
field. I use a schema that comes from an OpenAPI document, of which descriptions should be treated as markdown.
Initially I was not sure if that would have being a good or bad idea, especially as we already support the markdownDescription
field. But at the same time, I hardly can see any schema author/maintainer willing to support both plain-text and markdown versions. As markdown can also be read as plain text, the idea of assuming that description itself is markdown seems like a reasonable one.
Another benefit of using description itself is that we could use strict schema validation and make use of auto-complete for descriptions. Now we always have to remember to type the markdownDescription
which is not part of the JSON Schema spec.
~~@LoneDev6 that appears to be unrelated, and bug. Could you report a bug? Also I don’t see there that’s coming from. I’m open to a pull request.~~
Sorry, I misplaced the context. I do see markdownDescription
show up in the autocompletion in VSCode, but not in Monaco YAML.
Nvm, seems that the UX is just confusing because the > arrow is not shown if not hovered. The markdown is shown correctly.
https://user-images.githubusercontent.com/27242001/198031567-cd00f0ea-68fe-4e42-bd0f-e950e2af199d.mp4
Off-topic: I just wish there was a way to forcefully show the suggestion details panel using the vscode API, but seems there is no way. Let me know if you have a solution.