13 lines
410 B
TypeScript
13 lines
410 B
TypeScript
|
|
import { Module } from '@nestjs/common';
|
||
|
|
import { SwaggerModule } from '@nestjs/swagger';
|
||
|
|
import { swaggerConfig } from './swagger.config';
|
||
|
|
import { INestApplication } from '@nestjs/common';
|
||
|
|
|
||
|
|
@Module({})
|
||
|
|
export class DocsModule {
|
||
|
|
static setupSwagger(app: INestApplication) {
|
||
|
|
const document = SwaggerModule.createDocument(app, swaggerConfig);
|
||
|
|
SwaggerModule.setup('api-docs', app, document);
|
||
|
|
}
|
||
|
|
}
|