docs(api): 补全 OpenAPI 注释与生成文档

为接口、模型与脚本补齐 Swagger/OpenAPI 注释,生成最新文档,并增加一键生成与查看入口。
This commit is contained in:
2026-05-14 18:18:27 +08:00
parent 2685450f3e
commit 918dfbfee1
18 changed files with 16240 additions and 7 deletions
+8
View File
@@ -19,6 +19,14 @@
"command": "go run ./cmd/migrate"
}
},
"openapi": {
"executor": "nx:run-commands",
"outputs": ["{projectRoot}/docs/swagger.json", "{projectRoot}/docs/swagger.yaml"],
"options": {
"cwd": "apps/api",
"command": "go run github.com/swaggo/swag/cmd/swag@v1.16.4 init --parseInternal -d ./cmd/gateway,./internal/httpapi,./internal/store,./internal/auth -g main.go -o docs --outputTypes json,yaml"
}
},
"test": {
"executor": "nx:run-commands",
"outputs": ["{workspaceRoot}/coverage/apps/api"],