mirror of
https://github.com/dadosfera/maestro.git
synced 2026-11-13 09:59:07 +00:00
FIX: add authentication to swagger
This commit is contained in:
+5
-4
@@ -46,10 +46,11 @@ function configureSwagger(app: INestApplication) {
|
||||
const config = new DocumentBuilder()
|
||||
.setTitle(swaggerTitle)
|
||||
.setDescription('Documentation for Maestro gateway')
|
||||
.addBearerAuth(
|
||||
{ type: 'http', scheme: 'bearer', bearerFormat: 'JWT' },
|
||||
'Authorization',
|
||||
)
|
||||
.addSecurity('access-token', {
|
||||
type: 'apiKey',
|
||||
name: 'Authorization',
|
||||
in: 'header',
|
||||
})
|
||||
.build();
|
||||
|
||||
const document = SwaggerModule.createDocument(app, config);
|
||||
|
||||
Reference in New Issue
Block a user