Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-127858

REST Builder generated clients can not deserialize BigDecimals

    Details

      Description

      Steps to reproduce:

      • Use a rest client module generated by REST Builder, for example enabling Commerce Orders integration tests

      Expected result:

      Integration tests complete successfully

      Actual result:

      Tests fail with with misleading errors:

      com.liferay.headless.commerce.admin.order.resource.v1_0.test.OrderResourceTest > testGetOrderWithNestedEntities FAILED
          java.lang.IllegalArgumentException: Unsupported field name accountExternalReferenceCode
          	at com.liferay.headless.commerce.admin.order.client.problem.Problem$ProblemJSONParser.setField(Problem.java:178)
          	at com.liferay.headless.commerce.admin.order.client.problem.Problem$ProblemJSONParser.setField(Problem.java:140)
          	at com.liferay.headless.commerce.admin.order.client.json.BaseJSONParser.parseToDTO(BaseJSONParser.java:90)
          	at com.liferay.headless.commerce.admin.order.client.problem.Problem.toDTO(Problem.java:33)
          	at com.liferay.headless.commerce.admin.order.client.resource.v1_0.OrderResource$OrderResourceImpl.getOrder(OrderResource.java:676) 

      Debugging it show a ClassCastException when deserializing Strings to BigDecimals

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              brian.chan Brian Chan
              Reporter:
              riccardo.ferrari Riccardo Ferrari
              Participants of an Issue:
              Recent user:
              Sophia Zhang
              Engineering Assignee:
              Riccardo Ferrari
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                40 weeks, 6 days ago

                  Packages

                  Version Package
                  7.0.0 DXP FP98
                  7.0.X
                  7.1.10 DXP FP22
                  7.1.X
                  7.2.10 DXP FP11
                  7.2.10.4 DXP SP4
                  7.2.X
                  7.3.10 DXP FP1
                  7.3.10.1 DXP SP1
                  7.3.6 CE GA7
                  7.3.X
                  7.4.13 DXP GA1
                  Master