feat(tenant-api): expose Swagger UI in non-release mode

Adds an in-process Swagger UI and OpenAPI JSON under /swagger,
registered automatically when the Gin mode is not release. The
admin-web Vite dev server and production nginx config now proxy
/swagger to the tenant API so the docs are reachable from the
existing admin host.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-30 23:19:31 +08:00
parent a49ac32aa8
commit 461f186337
5 changed files with 673 additions and 0 deletions
+4
View File
@@ -58,6 +58,10 @@ export default defineConfig(({ mode }) => {
target: env.VITE_API_PROXY_TARGET || "http://localhost:8080",
changeOrigin: true,
},
"/swagger": {
target: env.VITE_API_PROXY_TARGET || "http://localhost:8080",
changeOrigin: true,
},
},
},
esbuild: isProd ? { drop: ["console", "debugger"] } : undefined,