samchon / nestia

NestJS Helper Libraries + TypeScript OpenAPI generator
https://nestia.io/
MIT License
1.71k stars 89 forks source link

Support swagger tag description #858

Closed samchon closed 3 months ago

samchon commented 3 months ago
@ApiTags("common")
@Controller("bbs/articles/:section")
export class BbsArticlesController {
  /**
   * Would be shown without any mark.
   *
   * @tag public Some description describing public group...
   * @summary Public API
   * @param section Section code
   * @param input Content to store
   * @returns Newly archived article
   */
  @ApiTags("protected")
  @TypedRoute.Post()
  public async store(
    @TypedParam("section") section: string,
    @TypedBody() input: IBbsArticle.IStore,
  ): Promise<IBbsArticle> {
    return {
      ...typia.random<IBbsArticle>(),
      ...input,
      section,
    };
  }