danishjamal104 commented on a change in pull request #1817:
URL: https://github.com/apache/fineract/pull/1817#discussion_r685601749



##########
File path: 
fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientsApiResourceSwagger.java
##########
@@ -240,6 +241,17 @@ private GetClientsTimeline() {}
 
         private PostClientsRequest() {}
 
+        static final class PostClientsDatatable {
+
+            private PostClientsDatatable() {}
+
+            @Schema(example = "Client Beneficiary information")
+            public String registeredTableName;
+            @Schema(example = "data")
+            public HashMap<String, Object> data;

Review comment:
       Since we aren't pretty sure about fields in in datable and their can be 
multiple datatable too with different fields, that's why HashMap is used. 
   
   For example, in below request we have `Client Beneficiary information` 
datatable associated with clients, similiary there can be multiple datable with 
different data fields based on client. So in order to meet that kind of design 
I have defined `HashMap<String, Object>` as data type of `data` field.
   ```
   {
   "officeId": 2,
    "fullname": "SDK Test Client 6 (No group)",
    "dateFormat": "dd MMMM yyyy",
    "locale": "en",
    "active": false,
    "activationDate": "28 July 2019",
   "datatables": [
        {
          "registeredTableName": "Client Beneficiary information",
           "data": {
               "FirstName": "First 1",
               "LastName": "Last",
               "Mobile Number": "831",
               "locale": "en"
              }
          }
       ]
   }
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to