feat(docs): implement comprehensive Chat and ChatId schemas for Swagger (#103)
* feat(docs): add ChatId schema definition to swagger.json * feat(docs): integrate ChatId and define base of Chat schema. * feat(docs): add response schema for chat listing
This commit is contained in:
parent
85dbb14b28
commit
c6c746afbc
3 changed files with 150 additions and 6 deletions
22
swagger.js
22
swagger.js
|
|
@ -80,6 +80,28 @@ const doc = {
|
|||
GetSessionsResponse: {
|
||||
success: true,
|
||||
result: ['session1', 'session2']
|
||||
},
|
||||
ChatId: {
|
||||
server: 'c.us | g.us',
|
||||
user: '1234567890',
|
||||
_serialized: '1234567890@c.us',
|
||||
},
|
||||
Chat: {
|
||||
id: { $ref: '#/definitions/ChatId' },
|
||||
name: 'John Doe',
|
||||
isGroup: false,
|
||||
unreadCount: 0,
|
||||
timestamp: 1770140061,
|
||||
archived: false,
|
||||
pinned: false,
|
||||
isMuted: false,
|
||||
muteExpiration: 0,
|
||||
// Add other chat properties as needed after create definitions
|
||||
},
|
||||
GetChatsResponse: {
|
||||
success: true,
|
||||
chats: [ { $ref: '#/definitions/Chat' } ],
|
||||
error: 'error message if any',
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue