I am using NestJS with Swagger Module to produce the equivalent API Spec. Is there a way to disable security for a specific controller method, while having marked the Controller class as requiring authentication? Example:
// apply bearer auth security to controller
@ApiBearerAuth()
@Controller()
export class AppController {
constructor(private readonly appService: AppService) {}
// How can **getHello** method be made public???
@Get()
getHello(): string {
return this.appService.getHello();
}
}
I am looking for a more intuitive way compared to the straightforward one where each controller method should be mark with security except for the public ones....
I have tried using @ApiOperation({ security: [] })
without any result. It still get's the security definition from the controller class