build the swagger documentation

This commit is contained in:
Sven Czarnian
2022-10-22 23:23:30 +02:00
parent ae501e25b4
commit fced0f7ec5

View File

@@ -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();