Il wrote a nestjs controller whith decorator
@Controller('sample')
export class SampleController {
@Get(`/sample}`)
@ApiOperation({
description: 'sample controller',
summary: 'sample',
})
@ApiOkResponse({
description: 'sample list',
type: String,
isArray: true,
})
@ApiSecurity({ roles: ['read'] })
async getSampleList(): Promise<string[]> {
return ['sample1', 'sample2'];
}
}
the file swagger-spec.yaml generated contains correct information according to decorator @ApiSecurity :
security:
- *ref_14
- roles:
- read
but the swagger ui (http://127.0.0.1:3000/swagger/#/default/SampleController_getSampleList) doesn't refer to this information ???
nest version : 8.2.5
@nestjs/swagger version : 5.2.1