diff --git a/src/main.ts b/src/main.ts index 727bddd..29e755f 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,5 +1,6 @@ import { NestFactory } from '@nestjs/core'; import { ValidationPipe } from '@nestjs/common'; +import { SwaggerModule, DocumentBuilder } from '@nestjs/swagger'; import helmet from 'helmet'; import { AppModule } from './app.module'; @@ -10,6 +11,15 @@ async function bootstrap() { app.enableCors(); app.useGlobalPipes(new ValidationPipe({ whitelist: true })); + const config = new DocumentBuilder() + .setTitle('Arrival MANager') + .setDescription('The AMAN Rest-API to plan arrival sequences') + .setVersion('0.1.0') + .addTag('aman') + .build(); + const document = SwaggerModule.createDocument(app, config); + SwaggerModule.setup('api', app, document); + await app.listen(3000); } bootstrap();