Skip to content

Commit

Permalink
fix: Fixed docs for send-list-message
Browse files Browse the repository at this point in the history
  • Loading branch information
icleitoncosta committed Nov 15, 2023
1 parent ce9269f commit 5f0e0d5
Show file tree
Hide file tree
Showing 2 changed files with 98 additions and 2 deletions.
45 changes: 44 additions & 1 deletion src/controller/messageController.ts
Expand Up @@ -506,7 +506,50 @@ export async function sendListMessage(req: Request, res: Response) {
#swagger.parameters["session"] = {
schema: 'NERDWHATS_AMERICA',
}
#swagger.deprecated=true
#swagger.requestBody = {
required: true,
"@content": {
"application/json": {
schema: {
type: "object",
properties: {
phone: { type: "string" },
isGroup: { type: "boolean" },
description: { type: "string" },
sections: { type: "array" },
buttonText: { type: "string" },
}
},
examples: {
"Send list message": {
value: {
phone: '5521999999999',
isGroup: false,
description: 'Desc for list',
buttonText: 'Select a option',
sections: [
{
title: 'Section 1',
rows: [
{
rowId: 'my_custom_id',
title: 'Test 1',
description: 'Description 1',
},
{
rowId: '2',
title: 'Test 2',
description: 'Description 2',
},
],
},
],
}
},
}
}
}
}
*/
const {
phone,
Expand Down
55 changes: 54 additions & 1 deletion src/swagger.json
Expand Up @@ -1533,7 +1533,60 @@
"bearerAuth": []
}
],
"deprecated": true
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"phone": {
"type": "string"
},
"isGroup": {
"type": "boolean"
},
"description": {
"type": "string"
},
"sections": {
"type": "array"
},
"buttonText": {
"type": "string"
}
}
},
"examples": {
"Send list message": {
"value": {
"phone": "5521999999999",
"isGroup": false,
"description": "Desc for list",
"buttonText": "Select a option",
"sections": [
{
"title": "Section 1",
"rows": [
{
"rowId": "my_custom_id",
"title": "Test 1",
"description": "Description 1"
},
{
"rowId": "2",
"title": "Test 2",
"description": "Description 2"
}
]
}
]
}
}
}
}
}
}
}
},
"/api/{session}/send-order-message": {
Expand Down

0 comments on commit 5f0e0d5

Please sign in to comment.