fix: 完善Swagger配置和构建脚本

- 修复docs:generate脚本路径
- 更新swagger.config.ts中的服务器地址
- 统一开发环境配置
This commit is contained in:
imeepos 2025-09-05 18:31:03 +08:00
parent 8ea6e4ed61
commit c250ba43ef
2 changed files with 3 additions and 3 deletions

View File

@ -26,7 +26,7 @@
"migration:revert": "npm run typeorm -- migration:revert",
"schema:sync": "npm run typeorm -- schema:sync",
"schema:drop": "npm run typeorm -- schema:drop",
"docs:generate": "nest build && node dist/generate-swagger-json.js",
"docs:generate": "nest build && node dist/src/generate-swagger-json.js",
"docs:serve": "nest start --watch"
},
"dependencies": {

View File

@ -49,8 +49,8 @@ export function setupSwagger(app: INestApplication): void {
.addTag('积分系统', '积分获取、消耗、查询管理')
.addTag('扩展服务', '预留的扩展功能接口')
.addServer('http://localhost:3000', '开发环境')
.addServer('https://api-dev.example.com', '测试环境')
.addServer('https://api.example.com', '生产环境')
.addServer('https://sd2s2bl25ni4n75na2bog.apigateway-cn-beijing.volceapi.com', '测试环境')
.addServer('https://sd2s2bl25ni4n75na2bog.apigateway-cn-beijing.volceapi.com', '生产环境')
.build();
const document = SwaggerModule.createDocument(app as any, config, {