feat: expose optional API docs through frontend ingress (#416)

This commit is contained in:
Daniel Volz
2026-03-11 10:03:34 +01:00
committed by GitHub
parent 75196e5fa8
commit dd8ddb64e6
3 changed files with 50 additions and 4 deletions
+5 -3
View File
@@ -204,12 +204,13 @@ Recommended values for API docs by environment:
|-------------|----------------|
| Development | `OPENAPI_DOCS_ENABLED=true` |
| Staging/Test | `OPENAPI_DOCS_ENABLED=true` |
| Production | `OPENAPI_DOCS_ENABLED=false` (or keep `auto` with `NODE_ENV=production`) |
| Production | leave it unset, or set `OPENAPI_DOCS_ENABLED=false` |
Notes:
- `auto` means: docs enabled when `NODE_ENV` is not `production`, disabled when `NODE_ENV=production`.
- Explicitly setting `OPENAPI_DOCS_ENABLED` always overrides `auto` behavior.
- If `OPENAPI_DOCS_ENABLED` is not set, docs are enabled outside production and disabled in production.
- If `OPENAPI_DOCS_ENABLED=true`, docs are available on `/docs` and `/docs/json`.
- If `OPENAPI_DOCS_ENABLED=false`, only the docs are disabled. The API still works normally.
### Authentication
@@ -256,6 +257,7 @@ API reference:
- Interactive docs: `/docs`
- OpenAPI JSON: `/docs/json`
- With the bundled frontend ingress, these paths work on the normal app URL as well, for example `http://localhost:4174/docs` when docs are enabled.
- Key management endpoints for authenticated users:
- `GET /auth/api-keys`
- `POST /auth/api-keys`