| Agent response schema | src/modules/agents/agents.entity.ts and agents-v1.controller.ts | Publish the actual signed agent response DTO, including title, type, status, phone-number IDs, current version, and complete detail-version fields. Do not use the Sequelize entity with only id decorated. | scripts/improve_v1_openapi.py expands the Agents schema. |
| Agent request Swagger types | Agent DTOs, including agents.dto.ts and agents2.dto.ts | Correct version_title, LLM fallback model/delay, transcriber, S2S voice provider, accent, icon, recording, responsiveness, and post-call analysis item decorators. Align examples with types and constraints. | The normalization script corrects public schema types and invalid examples. |
| Create Call response | src/modules/calls/dto/create-call-response.dto.ts and calls-v1.controller.ts | Keep the runtime response and DTO identical: id, to_phone_number, agent_id, and optional agent_version_number. Add a controller test that serializes the public response. | The OpenAPI success example now matches the controller DTO. |
| Call pagination parameters | src/modules/call-logs/dto/call-logs.dto.ts | Expose page and limit as integers with transformation, defaults, and limits instead of Swagger strings. Decide whether the list response should publish pagination metadata. | Docs explain the current string schema and root-array response. |
| Knowledge Base response | src/modules/knowledge_base/knowledge-base.entity.ts, service, and v1 controller | Decorate the public resource DTO and document the actual items plus meta list envelope. Remove fields not returned by the entity. | The OpenAPI schema and example now match service source. |
| Webhook events | src/modules/user-webhooks/dto/create-user-webhook.dto.ts, update DTO, delivery producer | Replace arbitrary strings and placeholder order events with one exported enum/catalog. Define the supported event names and payload schemas. | Docs use current dotted call examples but flag the catalog as contract source. |
| Webhook list envelope | src/modules/user-webhooks/user-webhooks-v1.controller.ts | Keep the webhooks collection key in schema, runtime response, tests, and examples. Publish default and maximum limits. | The OpenAPI example now uses webhooks and default limit 10. |
| Global errors and throttling | API gateway, guards, exception filters, and controllers | Confirm where 422 and 429 are emitted, whether Retry-After is guaranteed, actual rate-limit scopes, request IDs, and server timeout guarantees. Add reusable OpenAPI responses only for verified behavior. | Errors and reliability pages are conservative and do not claim one universal limit or header. |
| Operation descriptions | v1 controllers | Add the missing @ApiOperation({ description }) text upstream for all 49 public operations. | The normalization script fills 29 missing descriptions. |