Adding description on method level
@ApiOperation({ summary: 'Operation description' })
Check here: https://docs.nestjs.com/openapi/migration-guide#breaking-changes
Adding tag on class level (controller)
@ApiTags('MyTag')
This will create a collapsible block with all methods underneath it.
Check here: https://docs.nestjs.com/openapi/decorators
Answer from Tim on Stack Overflow Top answer 1 of 3
12
Adding description on method level
@ApiOperation({ summary: 'Operation description' })
Check here: https://docs.nestjs.com/openapi/migration-guide#breaking-changes
Adding tag on class level (controller)
@ApiTags('MyTag')
This will create a collapsible block with all methods underneath it.
Check here: https://docs.nestjs.com/openapi/decorators
2 of 3
11
To improve previous answer: You can add tag description on initial step
new DocumentBuilder()
.setTitle('API with NestJS')
...
.addTag('SomeTag1', 'Tag description 1')
.addTag('SomeTag2', 'Tag description 2')
And then use tag on class level (controller)
@ApiTags('SomeTag1')
addTag behaviour
const optionsBuilder = new ... SwaggerModule.setup('docs', app, document); I see in generated docs every tags, not just 'api' and 'public'. In my case addTag affects only to tags order, not tags visibility. Is it correct behavior? ... Nest version: 6.7.0 nestjs/swagger: 4.6.1 ... More on github.com
Above tags visible in Swagger UI when using multiple specifications
Documentation should be separated by modules, this way its confusing with empty tags for above created tags · Nest version: 5.7.0 Nest swagger: 2.5.1 For Tooling issues: - Node version: 10.15.0 - Platform: Windows Others: More on github.com
Nestjs Swagger - Publishing different API docs on separate routes - Stack Overflow
I am building an app that has public API and internal one. I would like to publish docs for these to different routes. I thought this would be accomplished by adding only certain tags to document (... More on stackoverflow.com
How to group endpoints in Nest js with Swagger
@KasirBarati if swagger doesn't support it, I don't think NestJS will do github.com/OAI/OpenAPI-Specification/issues/1367 2022-10-28T14:57:14.033Z+00:00 ... Find the answer to your question by asking. Ask question ... See similar questions with these tags. More on stackoverflow.com
GitHub
github.com › nestjs › swagger › issues › 1002
addTag behaviour · Issue #1002 · nestjs/swagger
October 21, 2020 - const optionsBuilder = new DocumentBuilder() .setTitle('Some app') .setDescription('Some API description') .setVersion('1.0') .addTag('api') .addTag('public') .addBearerAuth({ type: 'http', scheme: 'bearer', bearerFormat: 'JWT' }); optionsBuilder.addServer(config.get('openapi.serverUrl')); const options = optionsBuilder.build(); const document = SwaggerModule.createDocument(app, options); SwaggerModule.setup('docs', app, document); I see in generated docs every tags, not just 'api' and 'public'. In my case addTag affects only to tags order, not tags visibility. Is it correct behavior? ... Nest version: 6.7.0 nestjs/swagger: 4.6.1 swagger-ui-express: 4.1.3 For Tooling issues: - Node version: v10.22.0 - Platform: Linux Others:
Author nestjs
npm
npmjs.com › package › @nestjs › swagger
nestjs/swagger
2 weeks ago - OpenAPI (Swagger) module for Nest. $ npm i --save @nestjs/swagger · Overview & Tutorial · Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please read more here. Author - Kamil Myśliwiec ·
» npm install @nestjs/swagger
Published Jul 17, 2026
Version 11.4.6
NestJS
docs.nestjs.com › openapi › operations
Operations - OpenAPI | NestJS - A progressive Node.js framework
HintType<any> interface and applyDecorators function are imported from the @nestjs/common package. To ensure that SwaggerModule will generate a definition for our model, we must add it as an extra model, like we did earlier with the PaginatedDto in the controller.
GitHub
github.com › nestjs › swagger › blob › master › lib › decorators › api-use-tags.decorator.ts
swagger/lib/decorators/api-use-tags.decorator.ts at master · nestjs/swagger
OpenAPI (Swagger) module for Nest framework (node.js) :earth_americas: - swagger/lib/decorators/api-use-tags.decorator.ts at master · nestjs/swagger
Author nestjs
GitHub
github.com › nestjs › swagger › issues › 190
Above tags visible in Swagger UI when using multiple specifications · Issue #190 · nestjs/swagger
February 6, 2019 - I'm submitting a... [ ] Regression [x] Bug report [ ] Feature request [ ] Documentation issue or request Current behavior When using multiple swagger specifications, lower one has tags and models of all upper ones Expected behavior Every...
Author nestjs
DEV Community
dev.to › antoncodes › 5-tips-for-better-swagger-docs-in-nestjs-ng9
5 tips for better Swagger docs in NestJS - DEV Community
July 4, 2024 - // main.ts -> bootstrap() const config = new DocumentBuilder() // ... .addTag('seed') .addTag('auth') // ... rest of tags .build(); That's it for now! Hope these tips will make you a good service. If you want to see how everything from this post is implemented within an actual NestJS application, check out this repository. If you have more ideas of how to improve Swagger API documenting, don't hesitate to leave a comment!
Stack Overflow
stackoverflow.com › tags › nestjs-swagger › info
'nestjs-swagger' tag wiki - Stack Overflow
swagger-ui × 26 · node.js × 25 · openapi × 20 · javascript × 17 · nestjs-config × 10 · express × 8 · dto × 6 · class-validator × 6 · openapi-generator × 5 · typeorm × 4 · class-transformer × 3 · nestjs-jwt × 3 · nestjs-typeorm × 3 · npm × 2 · webpack × 2 · postman × 2 · keycloak × 2 · prisma × 2 · fastify × 2 · typescript-decorator × 2 · nestjs-passport × 2 · nestjs-gateways × 2 more related tags
notiz
notiz.dev › blog › openapi-in-nestjs
OpenAPI for your REST APIs in NestJS - notiz.dev
July 28, 2021 - Start again the Nest application and you should see the new users endpoints in the Swagger API. Apply available decorators prefixed with API to expose the properties for .dto.ts and .entity.ts files and the responses for your CRUD endpoints. Group your endpoints together by using @ApiTags(...tags) at the controller level. import { Controller } from '@nestjs/common'; import { ApiTags } from '@nestjs/swagger'; @Controller('users') @ApiTags('users') // 👈 apply tags export class UsersController { ...
Nestia
nestia.io › docs › swagger
Guide Documents > Swagger Document | Nestia
June 25, 2026 - Swagger → Strategy — JSDoc tags, security schemes, decomposition.
Stack Overflow
stackoverflow.com › questions › 70140494 › how-to-add-a-nestjs-swagger-controller-description
How to add a @nestjs/swagger controller description? - Stack Overflow
You can use the DocumentBuilder#addTag option when setting up Swagger to document the tag: