Danish Jamal created FINERACT-1373:
--------------------------------------
Summary: invalid response while getting datatable info in
GetDataTablesAppTableIdResponse
Key: FINERACT-1373
URL: https://issues.apache.org/jira/browse/FINERACT-1373
Project: Apache Fineract
Issue Type: Bug
Reporter: Danish Jamal
Assignee: Danish Jamal
Fix For: 1.5.0
The generated class "GetDataTablesAppTableIdResponse" is invalid since the
backend response is not same as the generated class for the endpoint
"datatables//\{dataTableName}/\{entityId}/". See example below
{code:java}
// fields defined in GetDataTablesAppTableIdResponse class
public static final String SERIALIZED_NAME_COLUMN_HEADERS = "columnHeaders";
@SerializedName("columnHeaders")
private List<ResultsetColumnHeaderData> columnHeaders = null;
public static final String SERIALIZED_NAME_DATA = "data";
@SerializedName("data")
private List<ResultsetRowData> data = null;{code}
{code:java}
// actual json response
{
"id": 2,
"client_id": 1,
"FirstName": "First name",
"LastName": "Last name",
"Mobile Number": null
}{code}
Also note that the actual JSON response is contextual, which contains key-value
pair and key will be different based on the specific table. Hence the generic
response class should be used.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)