question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TSDoc support by swagger plugin

See original GitHub issue

I’m submitting a…


[ ] Regression 
[ ] Bug report
[x] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.

Current behavior

TSDoc comments are ignored.

Expected behavior

TSDoc should be parsed and by swagger plugin.

Minimal reproduction of the problem with instructions


/**
 * @description  User model
 */
class UserDTO {
  /**
   * @description  password encrypted with HS256
   */
  encryptedPassword: string;
}

What is the motivation / use case for changing the behavior?

For now, i use @nestjs/swagger to expose third-party library methods as HTTP API. This library contains a lot of DTO classes, and swagger plugin helps me to automatically handle them. But it don’t respect TSDoc. TSDoc is widely used by everybody and it’s de facto standard to provide descriptions and another meta info. Without TSDoc supports @nestjs/swagger/plugin is kinda incomplete. With TSDoc support, the plugin will cover 100% of the possible use-cases. The teams could be absolute framework-agnostic, they will be able to exhaustively describe their DTO’s in pure TS.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:15
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
dilamecommented, Nov 10, 2020

Comments introspection feature was added in the previous release https://trilon.io/blog/eliminating-redundancy-with-nestjs-cli-plugins

Thank you, fascinated feature! What about @file and @deprecated?

0reactions
kamilmysliwieccommented, Nov 10, 2020

Comments introspection feature was added in the previous release https://trilon.io/blog/eliminating-redundancy-with-nestjs-cli-plugins

Read more comments on GitHub >

github_iconTop Results From Across the Web

typedoc-plugin-openapi-doc - npm
A typedoc plugin for ingesting jsdoc @swagger or @openapi comments as documentation. Latest version: 0.3.1, last published: 2 years ago.
Read more >
TSDoc
Visual Studio Code: an editor that supports syntax highlighting and interactive refactoring for TypeScript doc comments; Your own scripts! - Developers often ...
Read more >
TSDoc | npm.io
Generate document block(JsDoc,EsDoc,TsDoc) from signature ... A typedoc plugin for ingesting jsdoc @swagger or @openapi comments as documentation.
Read more >
Do you use Swagger/OpenAPI to document your APIs? If so ...
I have documented everything with TSDoc+typedoc, but this is internal documentation aimed at hypothetical devs working on this system of mine.
Read more >
swagger.io VS TypeDoc - compare differences & reviews?
Compare swagger.io VS TypeDoc and find out what's different, what people are saying, ... Seems fairly well maintained and has reasonable plugin support....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found