Uploaded image for project: 'Apache Fineract'
  1. Apache Fineract
  2. FINERACT-1373

invalid response while getting datatable info in GetDataTablesAppTableIdResponse

    XMLWordPrintableJSON

Details

    • Bug
    • Status: In Progress
    • Major
    • Resolution: Unresolved
    • None
    • 3.0.0
    • None

    Description

      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

      // 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;

       

      // actual json response
      {
          "id": 2,
          "client_id": 1,
          "FirstName": "First name",
          "LastName": "Last name",
          "Mobile Number": null
      }

       

      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.

      Attachments

        Issue Links

          Activity

            People

              danishjamal Danish Jamal
              danishjamal Danish Jamal
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: