From 65ae32dc8764c23e108904d327fff5f31125f5ba Mon Sep 17 00:00:00 2001 From: sdraris Date: Fri, 26 Sep 2025 16:44:47 +0200 Subject: [PATCH] reset main for swagger --- src/main.ts | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/src/main.ts b/src/main.ts index 89f8029..f07f148 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,7 +1,8 @@ import { NestFactory, Reflector } from '@nestjs/core'; import { AppModule } from './app.module'; import { ConfigService } from '@nestjs/config'; -import { SwaggerModule, DocumentBuilder } from '@nestjs/swagger'; +import { SwaggerModule } from '@nestjs/swagger/dist/swagger-module'; +import { DocumentBuilder } from '@nestjs/swagger'; import { AuthGuard } from './common/guards/auth.guard'; import { JwtService } from '@nestjs/jwt'; import { RolesGuard } from './common/guards/roles.guard'; @@ -43,18 +44,7 @@ async function bootstrap() { .build(); const document = SwaggerModule.createDocument(app, config); - SwaggerModule.setup('api-docs', app, document, { - swaggerOptions: { - persistAuthorization: true, - }, - customCssUrl: '/api-docs/swagger-ui.css', - customJs: [ - '/api-docs/swagger-ui-bundle.js', - '/api-docs/swagger-ui-standalone-preset.js', - '/api-docs/swagger-ui-init.js', - ], - }); - + SwaggerModule.setup('api-docs', app, document);