Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support examples property in VS Code #896

Closed
JacekArdanowski opened this issue Mar 7, 2023 · 1 comment · Fixed by redhat-developer/yaml-language-server#947
Closed

Comments

@JacekArdanowski
Copy link

JacekArdanowski commented Mar 7, 2023

Hi,
I would like to suggest new feature for displaying "examples" property in JSON Schema when on hover.

Describe the solution you would like

According to the standard:

New in draft 6 The examples keyword is a place to provide an array of examples that validate against the schema.
https://json-schema.org/understanding-json-schema/reference/generic.html

I would like to see examples field below description when hovering over the field that contains "examples" in JSON schema (see screenshot below)

Additional context

For example for timeout property defined like below:
image
I'd like to see the examples property below the description:
image

Also, I'm not sure what does "Source" here mean, any idea?

@LeShaunJ
Copy link

I believe this is already a feature; however, the rendering of it is less than ideal. Given the following:

image

It appears to render whitespace as raw HTML entity codes:

image

What I think we'd all appreciate is that it render such examples as syntax-highlighted YAML.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants