Skip to content

Free, Open Source, Self-Hosted WhatsApp API Gateway

fix(openapi): correct seven examples that publish values the API cannot produce

Yudhi Armyndharise48df35a2920
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 35702e865..3b8de1674 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- **Five routes now document a `503` they have been answering for releases** — the four group participant writes have spent the shared request budget since 0.14.5 and listing chats by label has answered `503` on a dead whatsapp-web.js page since 0.14.0, but all five published only their success statuses, so a client generated from the contract had no branch for a failure the gateway was already returning; the participant `503` in particular is the one status that separates "WhatsApp never answered" from the per-participant refusals a `200` reports inside `results`.
+### Fixed
+
+- **Seven published examples showed values the API cannot produce** — the session id carried a `sess_` prefix that every session route's `ParseUUIDPipe` rejects before the handler runs, two row ids were UUIDs truncated to `4f1c9b2a-...`, the logout response example omitted `engineLoaded` although its own schema marks it required, the readiness probe keyed its details on `database` where the code writes `mainDatabase` and `dataDatabase`, the engine list advertised a `send-text` capability neither engine declares, and the Baileys-only product send documented the whatsapp-web.js `true_<jid>_<id>` id form that route never returns.
+
## [0.14.6] - 2026-08-08
### Added
diff --git a/openapi.json b/openapi.json
index 9df2a5ab4..03a3b547d 100644
--- a/openapi.json
+++ b/openapi.json
@@ -667,7 +667,9 @@
"lastActive": "2026-06-25T09:01:55.000Z",
"createdAt": "2026-06-20T11:30:00.000Z",
"updatedAt": "2026-06-25T09:11:00.000Z",
- "lastError": null
+ "lastError": null,
+ "restriction": null,
+ "engineLoaded": false
}
}
}
@@ -8363,7 +8365,7 @@
"properties": {
"id": {
"type": "string",
- "example": "4f1c9b2a-..."
+ "example": "4f1c9b2a-8d3e-4c5b-9a17-2e6f0b4d8c31"
},
"action": {
"type": "string",
@@ -8761,7 +8763,7 @@
"properties": {
"id": {
"type": "string",
- "example": "sess_123e4567-e89b-12d3-a456-426614174000"
+ "example": "0a941dac-a965-45e7-b318-74ae8be134f0"
},
"name": {
"type": "string",
@@ -10326,7 +10328,10 @@
"type": "object",
"description": "Per-dependency outcome, keyed by dependency name. Present on both the 200 and the 503.",
"example": {
- "database": {
+ "mainDatabase": {
+ "status": "up"
+ },
+ "dataDatabase": {
"status": "up"
}
},
@@ -10704,7 +10709,9 @@
"features": {
"description": "Capabilities the engine declares.",
"example": [
- "send-text"
+ "text-messages",
+ "media-messages",
+ "group-management"
],
"type": "array",
"items": {
@@ -13469,8 +13476,8 @@
"properties": {
"id": {
"type": "string",
- "description": "The message id, assigned when the gateway accepts the message for sending. Note the field name: the send routes served by MessageService answer `messageId` for the same value. A 2xx here means the message was handed to the WhatsApp client, not that it was delivered.",
- "example": "[email protected]_3EB0123456789"
+ "description": "The message id, assigned when the gateway accepts the message for sending. Note the field name: the send routes served by MessageService answer `messageId` for the same value. A 2xx here means the message was handed to the WhatsApp client, not that it was delivered.\n\nThis route is Baileys-only, so the id is the bare key id Baileys assigns — not the `true_<jid>_<id>` serialized form the whatsapp-web.js send routes report.",
+ "example": "3EB0C767D26B8A3F6E"
},
"timestamp": {
"type": "number",
@@ -13805,7 +13812,7 @@
"messageId": {
"type": "string",
"description": "Gateway message row id.",
- "example": "4f1c9b2a-..."
+ "example": "7c2e5a91-3b8d-4f6a-a05c-9d1e4b7f2306"
},
"waMessageId": {
"type": "string",
diff --git a/src/modules/audit/dto/audit-response.dto.ts b/src/modules/audit/dto/audit-response.dto.ts
index 344ecd342..b942ff7a8 100644
--- a/src/modules/audit/dto/audit-response.dto.ts
+++ b/src/modules/audit/dto/audit-response.dto.ts
@@ -7,7 +7,7 @@ import { ApiProperty } from '@nestjs/swagger';
*/
export class AuditLogDto {
- @ApiProperty({ example: '4f1c9b2a-...' }) id!: string;
+ @ApiProperty({ example: '4f1c9b2a-8d3e-4c5b-9a17-2e6f0b4d8c31' }) id!: string;
@ApiProperty({ description: 'What happened.', example: 'session.create' })
action!: string;
diff --git a/src/modules/catalog/dto/catalog-response.dto.ts b/src/modules/catalog/dto/catalog-response.dto.ts
index 8b6b7372f..e6a2c8d67 100644
--- a/src/modules/catalog/dto/catalog-response.dto.ts
+++ b/src/modules/catalog/dto/catalog-response.dto.ts
@@ -102,8 +102,10 @@ export class ProductMessageResponseDto {
description:
'The message id, assigned when the gateway accepts the message for sending. Note the field ' +
'name: the send routes served by MessageService answer `messageId` for the same value. A 2xx ' +
- 'here means the message was handed to the WhatsApp client, not that it was delivered.',
- example: '[email protected]_3EB0123456789',
+ 'here means the message was handed to the WhatsApp client, not that it was delivered.\n\n' +
+ 'This route is Baileys-only, so the id is the bare key id Baileys assigns — not the ' +
+ '`true_<jid>_<id>` serialized form the whatsapp-web.js send routes report.',
+ example: '3EB0C767D26B8A3F6E',
})
id!: string;
diff --git a/src/modules/health/dto/health-response.dto.ts b/src/modules/health/dto/health-response.dto.ts
index f7a444884..755eef4ee 100644
--- a/src/modules/health/dto/health-response.dto.ts
+++ b/src/modules/health/dto/health-response.dto.ts
@@ -31,7 +31,7 @@ export class ReadinessResponseDto {
@ApiProperty({
description: 'Per-dependency outcome, keyed by dependency name. Present on both the 200 and the 503.',
- example: { database: { status: 'up' } },
+ example: { mainDatabase: { status: 'up' }, dataDatabase: { status: 'up' } },
additionalProperties: { type: 'object' },
})
details!: { [dependency: string]: object };
diff --git a/src/modules/infra/dto/infra-response.dto.ts b/src/modules/infra/dto/infra-response.dto.ts
index df1a5150e..c91aff92a 100644
--- a/src/modules/infra/dto/infra-response.dto.ts
+++ b/src/modules/infra/dto/infra-response.dto.ts
@@ -174,7 +174,11 @@ export class AvailableEngineDto {
@ApiProperty({ description: 'Whether the plugin is enabled. Disabled engines are still listed.', example: true })
enabled!: boolean;
- @ApiProperty({ type: [String], description: 'Capabilities the engine declares.', example: ['send-text'] })
+ @ApiProperty({
+ type: [String],
+ description: 'Capabilities the engine declares.',
+ example: ['text-messages', 'media-messages', 'group-management'],
+ })
features!: string[];
@ApiPropertyOptional({
diff --git a/src/modules/search/dto/search-response.dto.ts b/src/modules/search/dto/search-response.dto.ts
index cb327be3a..68d05a69c 100644
--- a/src/modules/search/dto/search-response.dto.ts
+++ b/src/modules/search/dto/search-response.dto.ts
@@ -7,7 +7,7 @@ import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
*/
export class SearchHitDto {
- @ApiProperty({ description: 'Gateway message row id.', example: '4f1c9b2a-...' })
+ @ApiProperty({ description: 'Gateway message row id.', example: '7c2e5a91-3b8d-4f6a-a05c-9d1e4b7f2306' })
messageId!: string;
@ApiProperty({ description: "WhatsApp's own message id.", example: '[email protected]_3EB0123' })
diff --git a/src/modules/session/dto/session-response.dto.ts b/src/modules/session/dto/session-response.dto.ts
index b38013688..eaaf401bd 100644
--- a/src/modules/session/dto/session-response.dto.ts
+++ b/src/modules/session/dto/session-response.dto.ts
@@ -35,7 +35,7 @@ export class AccountRestrictionDto {
}
export class SessionResponseDto {
- @ApiProperty({ example: 'sess_123e4567-e89b-12d3-a456-426614174000' })
+ @ApiProperty({ example: '0a941dac-a965-45e7-b318-74ae8be134f0' })
id!: string;
@ApiProperty({ example: 'my-bot' })
diff --git a/src/modules/session/session.controller.ts b/src/modules/session/session.controller.ts
index 4df443e17..770e5565d 100644
--- a/src/modules/session/session.controller.ts
+++ b/src/modules/session/session.controller.ts
@@ -276,6 +276,9 @@ export class SessionController {
createdAt: '2026-06-20T11:30:00.000Z',
updatedAt: '2026-06-25T09:11:00.000Z',
lastError: null,
+ restriction: null,
+ // The engine is torn out of the map before the status write, so a logout always reports false.
+ engineLoaded: false,
},
},
},