How to add description to @ApiTags for swagger in NestJS?

Viewed 1391

I want to add desription for block of api.

I have tried:

@ApiOperation({
  description: 'Operation description'
})

It doesn't work.

2 Answers

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')
Related