Skip to content

Commit

Permalink
docs: add delete message api in swagger docs
Browse files Browse the repository at this point in the history
- update freeapi version in package.json and swagger.yaml
  • Loading branch information
wajeshubham committed Apr 2, 2024
1 parent 1fe3447 commit 06e01d0
Show file tree
Hide file tree
Showing 2 changed files with 110 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "freeapi",
"version": "1.2.0",
"version": "1.3.1",
"description": "A API learning go",
"type": "module",
"main": "src/index.js",
Expand Down
110 changes: 109 additions & 1 deletion src/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ info:
## 🐞 Reporting issues

If you find API issues or bugs when testing, please create an [issue](https://github.com/hiteshchoudhary/apihub/issues/new) and assign it to a member of the development team.
version: 1.2.0
version: 1.3.1
contact: {}
servers:
- url: 'http://localhost:8080/api/v1'
Expand Down Expand Up @@ -47290,6 +47290,114 @@ paths:
schema:
type: string
example: 64d6722a5bda3332e4f368a9
/chat-app/messages/{chatId}/{messageId}:
delete:
tags:
- 💬 Chat App
summary: Delete chat message
description: >-
This API endpoint empowers logged-in users to seamlessly delete a
message in the chat that is sent by them.


By sending a `DELETE` request to this endpoint with the relevant
`chatId` and `messageId`, users can effectively remove the specified message,
thereby enhancing their control over their chat interactions and
facilitating a streamlined and personalized messaging experience.
operationId: deleteMessage
responses:
'200':
description: Delete chat message
headers:
Access-Control-Allow-Credentials:
schema:
type: string
example: 'true'
Access-Control-Allow-Origin:
schema:
type: string
example: http://localhost:3000
Connection:
schema:
type: string
example: keep-alive
Content-Length:
schema:
type: string
example: '87'
Date:
schema:
type: string
example: Wed, 02 Aug 2023 18:21:12 GMT
ETag:
schema:
type: string
example: W/"57-W8eeMdgPYpDebp4OQ6EuykCDvU0"
Keep-Alive:
schema:
type: string
example: timeout=5
RateLimit-Limit:
schema:
type: string
example: '500'
RateLimit-Remaining:
schema:
type: string
example: '488'
RateLimit-Reset:
schema:
type: string
example: '30'
Vary:
schema:
type: string
example: Origin
X-Powered-By:
schema:
type: string
example: Express
content:
application/json:
schema:
type: object
properties:
data:
type: object
properties:
_id:
type: string
example: 648e0746aeefd0cfa40adddf
message:
type: string
example: Message deleted successfully
statusCode:
type: number
example: 200
success:
type: boolean
example: true
examples:
Delete chat message:
value:
data:
_id: 648e0746aeefd0cfa40adddf
message: Message deleted successfully
statusCode: 200
success: true
parameters:
- name: chatId
in: path
required: true
schema:
type: string
example: 64ce7766307617f3a412b803
- name: messageId
in: path
required: true
schema:
type: string
example: 660c01cef9b076f062b161a8
/seed/generated-credentials:
get:
tags:
Expand Down

0 comments on commit 06e01d0

Please sign in to comment.