13 lines
437 B
TypeScript
13 lines
437 B
TypeScript
import {DocumentBuilder, SwaggerModule} from "@nestjs/swagger";
|
|
import {INestApplication} from "@nestjs/common";
|
|
|
|
export const loadSwagger = (app: INestApplication) => {
|
|
const config = new DocumentBuilder()
|
|
.setTitle('crosspublic Swagger file')
|
|
.setDescription('API description')
|
|
.setVersion('1.0')
|
|
.build();
|
|
|
|
const document = SwaggerModule.createDocument(app, config);
|
|
SwaggerModule.setup('docs', app, document);
|
|
} |