From abb387e7439b92faa2185bb0173edaa07cdf93ad Mon Sep 17 00:00:00 2001 From: Mahdi Date: Tue, 12 May 2026 15:49:46 +0330 Subject: [PATCH] fix swagger bearer authorization --- src/main.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main.ts b/src/main.ts index 9104c8c..9e5d393 100644 --- a/src/main.ts +++ b/src/main.ts @@ -9,7 +9,15 @@ async function bootstrap() { .setTitle('Montime API') .setDescription('Local services super app API') .setVersion('1.0') - .addBearerAuth() + .addBearerAuth( + { + type: 'http', + scheme: 'bearer', + bearerFormat: 'JWT', + }, + 'bearer', + ) + .addSecurityRequirements('bearer') .build(); const swaggerDocument = SwaggerModule.createDocument(app, swaggerConfig);