diff --git a/src/main.ts b/src/main.ts index 31354e7..4841580 100644 --- a/src/main.ts +++ b/src/main.ts @@ -2,9 +2,16 @@ import { NestFactory } from "@nestjs/core"; import { NestExpressApplication } from "@nestjs/platform-express"; import { DocumentBuilder, SwaggerModule } from "@nestjs/swagger"; import { AppModule } from "./app.module"; +import { ValidationPipe } from "@nestjs/common"; async function bootstrap() { const app = await NestFactory.create(AppModule); + app.useGlobalPipes( + new ValidationPipe({ + transform: true, + transformOptions: { enableImplicitConversion: true }, + }) + ); app.enableShutdownHooks(); // Setup API Docs