Coding task · NestJS course · Module 11: Swagger and OpenAPI

JWT Auth Configuration in Swagger

Add @ApiBearerAuth and @ApiUnauthorizedResponse decorators to the endpoints.

Task

Mark endpoints as JWT-protected using @ApiBearerAuth('JWT-auth') and @ApiUnauthorizedResponse