Skip to content

Commit

Permalink
feat : added swagger for update and delete
Browse files Browse the repository at this point in the history
  • Loading branch information
ddr-dileep committed Sep 10, 2024
1 parent 6521c7b commit b694b1e
Showing 1 changed file with 75 additions and 0 deletions.
75 changes: 75 additions & 0 deletions src/swagger/user.swagger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
},
},
},
},
};

0 comments on commit b694b1e

Please sign in to comment.