Skip to content

feat(docs): implement comprehensive Chat and ChatId schemas for Swagger#103

Merged
avoylenko merged 3 commits intoavoylenko:mainfrom
kaua-alves-queiros:main
Feb 28, 2026
Merged

feat(docs): implement comprehensive Chat and ChatId schemas for Swagger#103
avoylenko merged 3 commits intoavoylenko:mainfrom
kaua-alves-queiros:main

Conversation

@kaua-alves-queiros
Copy link
Copy Markdown
Contributor

📚 API Documentation Enhancement – Chat Schemas

This PR improves the API documentation by introducing explicit schemas for chat-related responses. As a result, the Swagger UI now accurately represents the data structures used in WhatsApp chat management.


✅ Changes

  • Schema Definitions
    Added the following schemas to swagger.js and swagger.json:

    • ChatId
    • Chat
    • GetChatsResponse
  • Controller Integration
    Updated getChats and getChatsWithSearch in clientController.js to leverage the new $ref schema definitions.

  • Documentation Clarity
    Refined endpoint descriptions related to chat retrieval, clearly specifying session-based behavior.


🚀 Impact

  • Provides clear and consistent expectations for the Chat object structure, including:
    • unreadCount
    • isGroup
    • Serialized ChatId

⚠️ Important Note on Chat Schema

[!IMPORTANT]
The current Chat schema represents a base version.
The lastMessage property and its associated nested models will be added in a future PR, once the required message schemas are finalized.

@avoylenko avoylenko merged commit c6c746a into avoylenko:main Feb 28, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants