mirror of
https://github.com/xiaoyiweb/YiAi.git
synced 2025-11-15 21:53:44 +08:00
15 lines
484 B
TypeScript
15 lines
484 B
TypeScript
import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger';
|
|
import { PORT, SWAGGERPREFIX, APIPREFIX } from '@/config/main';
|
|
|
|
const swaggerOptions = new DocumentBuilder()
|
|
.setTitle('Nine Team api document')
|
|
.setDescription('Nine Team api document')
|
|
.setVersion('1.0.0')
|
|
.addBearerAuth()
|
|
.build();
|
|
|
|
export function createSwagger(app) {
|
|
const document = SwaggerModule.createDocument(app, swaggerOptions);
|
|
SwaggerModule.setup('/nineai/swagger/docs', app, document);
|
|
}
|