/
home
/
infinitibizsol
/
testingcrm.infinitibizsol.com
/
docs
/
File Upload :
llllll
Current File: /home/infinitibizsol/testingcrm.infinitibizsol.com/docs/user.js
/** * @swagger * components: * schemas: * User: * type: object * required: * - name * - email * - password * - contact_no * - role * properties: * id: * type: string * description: The auto-generated id of the user * name: * type: string * description: The full name of the user * email: * type: string * description: The email address of the user * password: * type: string * description: The user's password * contact_no: * type: string * description: The contact number of the user * address: * type: string * description: The address of the user * image: * type: string * description: URL to the user's profile image * role: * type: string * enum: ["super_admin", "manager", "user"] * description: The role of the user * example: * name: "John Doe" * email: "john@example.com" * password: "12345" * contact_no: "+1234567890" * address: "Texas,Plao Alto" * role: "admin" * UserUpdateResponse: * type: object * properties: * message: * type: string * example: "User updated successfully" * UserDeleteResponse: * type: object * properties: * message: * type: string * example: "User and related data deleted successfully" * securitySchemes: * bearerAuth: * type: http * scheme: bearer * bearerFormat: JWT */ /** * @swagger * tags: * - name: User * description: Parent tag for user-related operations */ /** * @swagger * /api/v1/user/list: * get: * summary: Returns the list of all users * tags: [User] * security: * - bearerAuth: [] * responses: * 200: * description: The list of categories * content: * application/json: * schema: * type: array * items: * $ref: '#/components/schemas/User' */ /** * @swagger * /api/v1/user/create: * post: * summary: Create a new user * tags: [User] * security: * - bearerAuth: [] * requestBody: * required: true * content: * application/json: * schema: * $ref: '#/components/schemas/User' * responses: * 201: * description: The user was successfully created * content: * application/json: * schema: * $ref: '#/components/schemas/User' */ /** * @swagger * /api/v1/user/create-admin: * post: * summary: Create a new Admin * tags: [User] * requestBody: * required: true * content: * application/json: * schema: * $ref: '#/components/schemas/User' * responses: * 201: * description: The user was successfully created * content: * application/json: * schema: * $ref: '#/components/schemas/User' */ /** * @swagger * /api/v1/user/profile: * get: * summary: Get logged-in user's profile * description: | * - Retrieves profile information from the JWT payload of the logged-in user. * tags: [User] * security: * - bearerAuth: [] * responses: * 200: * description: The user was retrieved successfully * content: * application/json: * schema: * $ref: '#/components/schemas/User' */ /** * @swagger * /api/v1/user/single/{id}: * get: * summary: Get a user by ID * tags: [User] * security: * - bearerAuth: [] * parameters: * - in: path * name: id * schema: * type: string * required: true * description: The user ID * responses: * 200: * description: The user was retrieved successfully * content: * application/json: * schema: * $ref: '#/components/schemas/User' */ /** * @swagger * /api/v1/user/edit/{id}: * put: * summary: Update user by ID * tags: [User] * security: * - bearerAuth: [] * parameters: * - in: path * name: id * schema: * type: string * required: true * description: The user ID * requestBody: * required: true * content: * application/json: * schema: * $ref: '#/components/schemas/User' * responses: * 200: * description: The user was updated * content: * application/json: * schema: * $ref: '#/components/schemas/UserUpdateResponse' */ /** * @swagger * /api/v1/user/update-profile: * put: * summary: Update logged-in user's profile * tags: [User] * security: * - bearerAuth: [] * requestBody: * required: true * content: * application/json: * schema: * $ref: '#/components/schemas/User' * responses: * 200: * description: The user profile was updated * content: * application/json: * schema: * $ref: '#/components/schemas/UserUpdateResponse' */ /** * @swagger * /api/v1/user/delete/{id}: * delete: * summary: Remove a user by ID * tags: [User] * security: * - bearerAuth: [] * parameters: * - in: path * name: id * schema: * type: string * required: true * description: The user ID * responses: * 200: * description: The user was deleted * content: * application/json: * schema: * $ref: '#/components/schemas/UserDeleteResponse' */ "use strict";
Copyright ©2k19 -
Hexid
|
Tex7ure