Skip to content

Swagger Controller Annotations

Tags

Define a specific tag for a controller:

@ApiTags('prompts')

Controller Name

Define a specific name for a controller:

@Controller('prompts')

API Auth

Define the authentication type:

@ApiBearerAuth('auth-name')

Response Types

Specify the response types:

@ApiResponse({ status: 201, description: 'The record has been successfully created.'})
@ApiResponse({ status: 403, description: 'Forbidden.'})