mirror of
https://github.com/xiaoyiweb/YiAi.git
synced 2025-11-18 15:13:41 +08:00
初始化
This commit is contained in:
14
service/src/common/swagger/index.ts
Normal file
14
service/src/common/swagger/index.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
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);
|
||||
}
|
||||
Reference in New Issue
Block a user