Skip to content

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

Open
kaua-alves-queiros wants to merge 3 commits intoavoylenko:mainfrom
kaua-alves-queiros:main
Open

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

Conversation

@kaua-alves-queiros
Copy link
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.

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.

1 participant