Uploaded image for project: 'Webservices REST Module'
  1. Webservices REST Module
  2. RESTWS-451

Nested custom type will fail with conversion exception

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Should
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.7
    • Labels:
    • Complexity:
      Medium

      Description

      When I pass the following parameter for custom representation on a patient, it throws ConversionException:

      <YOUR-OPENMRS>/ws/rest/v1/patient?q=test&v=custom:(uuid,identifiers:(uuid,identifierType:(uuid)),attributes:(uuid,attributeType:(uuid)))
      

      But passing the following will make it work as expected:

      <YOUR-OPENMRS>/ws/rest/v1/patient?q=test&v=custom:(uuid,identifiers:(uuid,identifierType:(uuid,),),attributes:(uuid,attributeType:(uuid,),),)
      

      Notice the comas in the custom representation. This issue happens because of the splitting process and only relying on the "(" and ")" to determine the nested object in the custom representation.

      BaseDelegatingResource#getCustomRepresentationDescription(CustomRepresentation)
      

        Attachments

          Activity

            People

            • Assignee:
              pmuchowski PaweĊ‚ Muchowski
              Reporter:
              nyoman Nyoman Ribeka [X] (Inactive)
              Designated Committer:
              Rafal Korytkowski
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day
                1d