From 17a42d04c66f85d48d0be582b4fbf64652165e64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Kratochv=C3=ADl?= <xkrato10@fi.muni.cz> Date: Sat, 18 Jun 2022 19:56:00 +0200 Subject: [PATCH] feat: added Swagger options --- backend/src/main.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/backend/src/main.ts b/backend/src/main.ts index fddea63..dc1e60f 100644 --- a/backend/src/main.ts +++ b/backend/src/main.ts @@ -2,7 +2,7 @@ import { NestFactory } from '@nestjs/core'; import { ConfigService } from '@nestjs/config'; import { AppModule } from './app.module'; import { ValidationPipe } from '@nestjs/common'; -import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger'; +import { DocumentBuilder, SwaggerCustomOptions, SwaggerModule } from '@nestjs/swagger'; async function bootstrap(): Promise<void> { const app = await NestFactory.create(AppModule); @@ -22,7 +22,10 @@ async function bootstrap(): Promise<void> { .addTag('categories') .build(); const swaggerDoc = SwaggerModule.createDocument(app, swaggerDocConfig); - SwaggerModule.setup('/', app, swaggerDoc); + const swaggerOptions: SwaggerCustomOptions = { + customSiteTitle: 'Movie Base API Docs' + } + SwaggerModule.setup('/', app, swaggerDoc, swaggerOptions); const port = configService.get<number>('PORT') | 4000; console.log(`NestJS server is listening on: http://localhost:${port}`); -- GitLab