UI using wrong request body on staging crosswalk changes

Description

PRDE - Bug default text according to the team DoR (Definition of Ready)

01 - PERSON OF CONTACT (PERSON THAT CAN ANSWER QUESTIONS ABOUT THE PROBLEM):

@Breno Zipoli Monteiro Papa
02 - PROBLEM (WHAT'S THE ISSUE?):

When trying to add/remove crosswalks (identifiers) on stagings, UI is sending the wrong request body, making backend return error.

Error: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was STRING at path $.mdmCrosswalkTemplate.mdmCrossreference. - Expected BEGIN_ARRAY but was STRING at path $.mdmCrosswalkTemplate.mdmCrossreference. (JsonSyntaxException)

Wrong request piece: "mdmCrosswalkTemplate":{"mdmCrossreference":{"PCNFSAID":"numtransvenda,prazo2"}}

Request should look like this: "mdmCrosswalkTemplate":{"mdmCrossreference":{"PCNFSAID":["numtransvenda","prazo2"]}}

Paliative right now is to copy request’s cURL, editing it and send it via terminal.
03 - STEPS TO REPRODUCE (STEP (1...N), VIDEO, SCREENSHOTS, LOGS FOLDER, HEARTBEAT, ETC. – IF IS NOT POSSIBLE TO REPRODUCE EXPLAIN THE REASON):

Use attached staging snapshot.

Create a staging and add a field to the already existing crosswalk, like so:

04 - LINKS (ADD A LINK TO THE BUG OR TO THE TENANT):
05 - EXPECTED BEHAVIOR (LIST THE EXPECTED BEHAVIORS TO CONSIDER THIS BUG AS DONE):

  • Successfully modify staging crosswalk.
    • Crosswalk pattern:
{
   "mdmFlexible":"false",
   "mdmExportData":"false",
   "mdmStagingMapping":{
      "properties":{
         "cod-emitente":{
            "type":"integer"
         },
         "cgc":{
            "type":"string"
         },
         "nome-emit":{
            "type":"string"
         }
      }
   },
   "mdmCrosswalkTemplate":{
      "mdmCrossreference":{
         "emitente":[
            "cod-emitente"
         ]
      }
   }
}