add dto validation and swagger schemas

This commit is contained in:
2026-05-12 16:17:39 +03:30
parent abb387e743
commit 460537090b
21 changed files with 510 additions and 0 deletions
+9
View File
@@ -1,10 +1,19 @@
import 'reflect-metadata';
import { ValidationPipe } from '@nestjs/common';
import { NestFactory } from '@nestjs/core';
import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger';
import { AppModule } from './app.module';
async function bootstrap() {
const app = await NestFactory.create(AppModule);
app.useGlobalPipes(
new ValidationPipe({
forbidNonWhitelisted: true,
transform: true,
whitelist: true,
}),
);
const swaggerConfig = new DocumentBuilder()
.setTitle('Montime API')
.setDescription('Local services super app API')