swagger
swagger copied to clipboard
feat(): add support for additional TSDoc tags
PR Checklist
Please check if your PR fulfills the following requirements:
- [x] The commit message follows our guidelines: https://github.com/nestjs/nest/blob/master/CONTRIBUTING.md
- [x] Tests for the changes have been added (for bug fixes / features)
- [ ] Docs have been added / updated (for bug fixes / features)
PR Type
What kind of change does this PR introduce?
- [ ] Bugfix
- [x] Feature
- [ ] Code style update (formatting, local variables)
- [ ] Refactoring (no functional changes, no api changes)
- [ ] Build related changes
- [ ] CI related changes
- [ ] Other... Please describe:
What is the current behavior?
Issue Number: https://github.com/nestjs/swagger/issues/1695
Currently, nestjs/swagger only supports @example
TSDoc tags.
What is the new behavior?
This PR adds support for the @deprecated
TSDoc tag, in addition to the existing support for @example
tag. It also defines a more solid interface for adding additional tag support in the future, such as support for @param
as discussed in #1695.
Note that this PR doesn't yet add support for @param
, since there likely has to be a larger discussion about how it should be implemented (e.g. what happens when the symbol name differs from the property name, like @Query('pageLimit') limit: number
).
Does this PR introduce a breaking change?
- [ ] Yes
- [x] No
Other information
I tried to build this in a way that could be easily extendable in the future for additional tags. If anyone has suggestions on how this could be improve, please let me know!
Hi @andrewda and Nest team, when we can expect this to be merged ? We are following this feature request from quite some time. Thanks
@andrewda, just to add to @cqravinder's point, is there anything missing from this PR that we could help out with? It would be great if we could push this one through.
We're using this to generate an API Client and, right now, we have to resort to manual monkey patching to mark certain endpoints as @deprecated
and inform our users.
Hey @joaocarmo, I went ahead and fixed the conflicts here. I believe this is still ready to go, just waiting for a review from the NestJS team!
lgtm