-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat : added swagger for update and delete
- Loading branch information
1 parent
6521c7b
commit b694b1e
Showing
1 changed file
with
75 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -114,4 +114,79 @@ export const userSwagger = { | |
}, | ||
}, | ||
}, | ||
"/api/v1/user/update-info": { | ||
patch: { | ||
tags: ["Auth"], | ||
summary: "Update user information", | ||
description: "API to update user information using a Bearer token.", | ||
security: [ | ||
{ | ||
BearerAuth: [], | ||
}, | ||
], | ||
requestBody: { | ||
required: true, | ||
content: { | ||
"application/json": { | ||
schema: { | ||
type: "object", | ||
properties: { | ||
username: { | ||
type: "string", | ||
example: "newusername", | ||
}, | ||
email: { | ||
type: "string", | ||
example: "[email protected]", | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
responses: { | ||
"200": { | ||
description: "User information updated successfully", | ||
}, | ||
"400": { | ||
description: "Bad request (validation errors or missing data)", | ||
}, | ||
"401": { | ||
description: "Unauthorized (Invalid or missing token)", | ||
}, | ||
"404": { | ||
description: "Not found (User not found)", | ||
}, | ||
"500": { | ||
description: "Server error", | ||
}, | ||
}, | ||
}, | ||
}, | ||
"/api/v1/user/delete-info": { | ||
delete: { | ||
tags: ["Auth"], | ||
summary: "Delete user information", | ||
description: "API to delete user information using a Bearer token.", | ||
security: [ | ||
{ | ||
BearerAuth: [], | ||
}, | ||
], | ||
responses: { | ||
"200": { | ||
description: "User information deleted successfully", | ||
}, | ||
"401": { | ||
description: "Unauthorized (Invalid or missing token)", | ||
}, | ||
"404": { | ||
description: "Not found (User not found)", | ||
}, | ||
"500": { | ||
description: "Server error", | ||
}, | ||
}, | ||
}, | ||
}, | ||
}; |