Free, Open Source, Self-Hosted WhatsApp API Gateway
TypeScript apibotgatewayself-hostedwhatsappwhatsapp-apiwhatsapp-automationwhatsapp-botwhatsapp-gatewaywhatsapp-gateway-apiwhatsapp-webwhatsapp-web-api
docs(api): document the two pre-routing refusals in the OpenAPI description
Yudhi Armyndharise0ffab213013
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 2c18c17e8..a8b480edc 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0## [Unreleased]+### Changed++- **The API description now documents the two statuses middleware returns before routing** — `415` for a compressed request body and `503` with `Retry-After` when too much body data is already in flight, neither of which appeared anywhere in the OpenAPI document despite applying to every operation.+- **The Helm chart now states the reason `replicaCount` must stay 1 that actually applies today** — the warning described two pods corrupting shared session auth, which a session lease and per-pod volumes already prevent, so an operator acting on it would mitigate the wrong thing.+## [0.14.4] - 2026-08-07### Fixeddiff --git a/openapi.json b/openapi.jsonindex cac571fa5..57551ac5b 100644--- a/openapi.json+++ b/openapi.json@@ -7201,7 +7201,7 @@},"info": {"title": "OpenWA API",- "description": "Open Source WhatsApp API Gateway - Free, Self-Hosted HTTP API",+ "description": "Open Source WhatsApp API Gateway - Free, Self-Hosted HTTP API\n\n**Gateway-wide responses.** Two statuses are returned by middleware before routing, so any operation can emit them:\n\n- `415 Unsupported Media Type` — the request body carries a `Content-Encoding` other than `identity`. The aggregate in-flight body cap counts wire bytes, so a compressed body would be admitted on its compressed size and then inflated past the memory it is meant to bound. Send the body uncompressed.\n- `503 Service Unavailable` with `Retry-After` — the gateway already has too much request body data in flight. The body is not read; retry after the given delay.","version": "0.14.4","contact": {"name": "OpenWA",diff --git a/src/config/swagger.config.ts b/src/config/swagger.config.tsindex 39a6be114..8dd663271 100644--- a/src/config/swagger.config.ts+++ b/src/config/swagger.config.ts@@ -56,7 +56,21 @@ export function createSwaggerConfig(): Omit<OpenAPIObject, 'paths'> {return (new DocumentBuilder().setTitle('OpenWA API')- .setDescription('Open Source WhatsApp API Gateway - Free, Self-Hosted HTTP API')+ // Two refusals are issued by middleware BEFORE routing, so they apply to every operation+ // below and cannot be expressed as a per-operation @ApiResponse without repeating them 187+ // times. Documenting them here keeps the contract honest for clients that would otherwise+ // meet an undocumented status.+ .setDescription(+ 'Open Source WhatsApp API Gateway - Free, Self-Hosted HTTP API\n\n' ++ '**Gateway-wide responses.** Two statuses are returned by middleware before routing, ' ++ 'so any operation can emit them:\n\n' ++ '- `415 Unsupported Media Type` — the request body carries a `Content-Encoding` other ' ++ 'than `identity`. The aggregate in-flight body cap counts wire bytes, so a compressed ' ++ 'body would be admitted on its compressed size and then inflated past the memory it is ' ++ 'meant to bound. Send the body uncompressed.\n' ++ '- `503 Service Unavailable` with `Retry-After` — the gateway already has too much ' ++ 'request body data in flight. The body is not read; retry after the given delay.',+ ).setVersion(version).addApiKey({ type: 'apiKey', name: 'X-API-Key', in: 'header' }, API_KEY_SECURITY_SCHEME)// The METRICS_TOKEN bearer gates only GET /api/metrics (applied per-operation there —