build the swagger documentation
This commit is contained in:
10
src/main.ts
10
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();
|
||||
|
||||
Reference in New Issue
Block a user