fix: 完善Swagger配置和构建脚本
- 修复docs:generate脚本路径 - 更新swagger.config.ts中的服务器地址 - 统一开发环境配置
This commit is contained in:
parent
8ea6e4ed61
commit
c250ba43ef
|
|
@ -26,7 +26,7 @@
|
||||||
"migration:revert": "npm run typeorm -- migration:revert",
|
"migration:revert": "npm run typeorm -- migration:revert",
|
||||||
"schema:sync": "npm run typeorm -- schema:sync",
|
"schema:sync": "npm run typeorm -- schema:sync",
|
||||||
"schema:drop": "npm run typeorm -- schema:drop",
|
"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"
|
"docs:serve": "nest start --watch"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
||||||
|
|
@ -49,8 +49,8 @@ export function setupSwagger(app: INestApplication): void {
|
||||||
.addTag('积分系统', '积分获取、消耗、查询管理')
|
.addTag('积分系统', '积分获取、消耗、查询管理')
|
||||||
.addTag('扩展服务', '预留的扩展功能接口')
|
.addTag('扩展服务', '预留的扩展功能接口')
|
||||||
.addServer('http://localhost:3000', '开发环境')
|
.addServer('http://localhost:3000', '开发环境')
|
||||||
.addServer('https://api-dev.example.com', '测试环境')
|
.addServer('https://sd2s2bl25ni4n75na2bog.apigateway-cn-beijing.volceapi.com', '测试环境')
|
||||||
.addServer('https://api.example.com', '生产环境')
|
.addServer('https://sd2s2bl25ni4n75na2bog.apigateway-cn-beijing.volceapi.com', '生产环境')
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
const document = SwaggerModule.createDocument(app as any, config, {
|
const document = SwaggerModule.createDocument(app as any, config, {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue