Skip to content

feat: new jsdoc comments formatter #797

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

Merged
merged 3 commits into from
Dec 14, 2021

Conversation

sadfsdfdsa
Copy link
Contributor

@sadfsdfdsa sadfsdfdsa commented Nov 5, 2021

Feat more powerful comments formatter with jsdoc tags supports.

TYPE: FEATURE
AFFECTS: ONLY COMMENTS

Now supports:

  • title as simple description comment (as description in actual version)
  • format from yaml with prefix (example: Format: date-time), think it's better to have it)
  • @deprecated as in previous version
  • @description something as JSDOC tag (actual version: without tag, but now title use that format and description switched to tag)
  • @default something as JSDOC tag
  • @example something as JSDOC tag

Generated example with full possibilities of new version:
image

Also added json (ping me if need to go to yaml) with all new jsdoc config example.

Of course, I broke tests that are designed for the old description format, thinks it's better to change expects with new generated. Snapshots different only in comments body.

@sadfsdfdsa sadfsdfdsa marked this pull request as ready for review November 5, 2021 14:44
@sadfsdfdsa
Copy link
Contributor Author

@drwpow sorry for pushing, but we need to merge this pr, or we'll only have to use the fork version of your package (

Copy link
Contributor

@drwpow drwpow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fantastic! Thank you for adding.

Also, sorry for the delay on this. I kinda was maxxed out on open-source maintenance for a while this year.

@drwpow drwpow merged commit 27d5197 into openapi-ts:main Dec 14, 2021
@drwpow
Copy link
Contributor

drwpow commented Dec 14, 2021

I won’t push a new release today, as I want to do a little local testing. But this will go out in a minor release this week

@sadfsdfdsa
Copy link
Contributor Author

No problem, thanks for reaction and merging, hope work with this package in future as well!

@sadfsdfdsa sadfsdfdsa deleted the pr/improve-jsdoc-comments branch December 15, 2021 09:26
@drwpow
Copy link
Contributor

drwpow commented Dec 26, 2021

@all-contributors please add @sadfsdfdsa for code

@allcontributors
Copy link
Contributor

@drwpow

I've put up a pull request to add @sadfsdfdsa! 🎉

@drwpow
Copy link
Contributor

drwpow commented Dec 27, 2021

Released in 4.5.0!

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

Successfully merging this pull request may close these issues.

2 participants