From f6e01ac9e3c799a171b6694bdef00394e6b29db1 Mon Sep 17 00:00:00 2001 From: paritosh18 Date: Mon, 8 Dec 2025 16:58:30 +0530 Subject: [PATCH] Update CURL example and enhance Swagger documentation for admin profile update --- CURL_EXAMPLE.md | 2 +- swagger.json | 38 ++++++++++++++++++++++++++++++++++++-- 2 files changed, 37 insertions(+), 3 deletions(-) diff --git a/CURL_EXAMPLE.md b/CURL_EXAMPLE.md index 2332ae6..0894f7f 100644 --- a/CURL_EXAMPLE.md +++ b/CURL_EXAMPLE.md @@ -1,7 +1,7 @@ # CURL Command for Testing addCompanyDetails Lambda ## Prerequisites -1. Replace `YOUR_API_URL` with your actual API Gateway URL +1. Replace `YOUR_API_URL` with your actual API Gateway URL 2. Replace `YOUR_AUTH_TOKEN` with a valid JWT token 3. Replace file paths with actual document files on your system diff --git a/swagger.json b/swagger.json index f47409b..671b15d 100644 --- a/swagger.json +++ b/swagger.json @@ -656,10 +656,44 @@ "patch": { "tags": ["Minglar Admin - Auth"], "summary": "Update Admin Profile", - "description": "Update Minglar admin profile with image", + "description": "Update Minglar admin profile with basic details, address and documents (profile image, Aadhar, PAN)", "security": [{ "bearerAuth": [] }], "requestBody": { - "content": { "multipart/form-data": { "schema": { "type": "object", "properties": { "firstName": { "type": "string" }, "lastName": { "type": "string" }, "profileImage": { "type": "string", "format": "binary" } } } } } + "required": true, + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "userData": { + "type": "string", + "description": "JSON string with basic user details (firstName, lastName, mobileNumber, dateOfBirth)", + "example": "{\\\"firstName\\\": \\\"Sachin\\\", \\\"lastName\\\": \\\"AM\\\", \\\"mobileNumber\\\": \\\"+91987653210\\\", \\\"dateOfBirth\\\": \\\"1990-01-01\\\"}" + }, + "addressData": { + "type": "string", + "description": "JSON string with address details (address1, stateXid, countryXid, cityXid, pinCode)", + "example": "{\\\"address1\\\": \\\"Girgardan Ghaat\\\", \\\"stateXid\\\": 1, \\\"countryXid\\\": 1, \\\"cityXid\\\": 1, \\\"pinCode\\\": \\\"12345\\\"}" + }, + "profileImage": { + "type": "string", + "format": "binary", + "description": "Profile image file" + }, + "aadharCard": { + "type": "string", + "format": "binary", + "description": "Aadhar card image/file" + }, + "panCard": { + "type": "string", + "format": "binary", + "description": "PAN card image/file" + } + } + } + } + } }, "responses": { "200": { "description": "Profile updated" }