14 lines
471 B
TypeScript
14 lines
471 B
TypeScript
import { INestApplication } from '@nestjs/common';
|
|
import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger';
|
|
|
|
export function openApi(app: INestApplication) {
|
|
const config = new DocumentBuilder()
|
|
.setTitle('MyFreight Assessment')
|
|
.setDescription('Backend assessment for MyFreight')
|
|
.setVersion('1.0')
|
|
.addTag('MyFreight')
|
|
.build();
|
|
const document = SwaggerModule.createDocument(app, config);
|
|
SwaggerModule.setup('api', app, document);
|
|
}
|