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

feat: Add option to generate markdownDescription #1773

Merged
merged 1 commit into from
Oct 16, 2023

Conversation

Jason3S
Copy link
Contributor

@Jason3S Jason3S commented Sep 10, 2023

fixes #1544

I have been running into a lot of trouble generating schemas that can be use by VS Code to display readable descriptions if they contain markdown.

I saw #1544 and took the approach of adding a new option: --markdown-description. This option will will cause markdownDescription to be generated as well a description.

Note: this option will only populate markdownDescription is will not parse it or attempt to validate that the markdown is valid. I think that is beyond the scope of this PR.

Markdown validation could be done at a later date.

@Jason3S
Copy link
Contributor Author

Jason3S commented Sep 11, 2023

Thoughts

Implicit keyword markdownDescription

In this PR, the markdownDescription key word must be explicitly added as an option. This might lead to some unexpected behavior for some users that might also use @markdownDescription tags. A solution is to add markdownDescription as a keyword if option --markdownDescription is used.

Option --validation-keywords=markdownDescription

If a user explicitly adds keyword markdownDescription, it implies option --markdownDescription.

@Jason3S
Copy link
Contributor Author

Jason3S commented Oct 8, 2023

@domoritz,

Gentle nudge.

@domoritz
Copy link
Member

Thank you. Looks good and I'll merge.

I'll consider this option beta for now until @remcohaszing and @GeekyEggo had a chance to review the behavior or enough time passes. So changes are possible without a major version bump.

@domoritz domoritz merged commit 2ec470e into vega:next Oct 16, 2023
@github-actions github-actions bot mentioned this pull request Oct 16, 2023
@github-actions
Copy link

🚀 PR was released in v1.4.0 🚀

@github-actions github-actions bot added released This issue/pull request has been released. and removed prerelease labels Oct 16, 2023
@remcohaszing
Copy link
Contributor

Thanks! I think it looks great. markdownDescription isn’t processed, which is good.

I still think the processing of description without context is dangerous, because nothing in plain text has a semantic meaning. But that’s left untouched by this PR.

@GeekyEggo
Copy link

Thank you for this addition; I’ve ran some local tests and everything looks good! 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released This issue/pull request has been released.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Properly process JSDoc descriptions
4 participants