Hi Team,

I am trying to use a remote spec json file with jolt endpoint but shift
operation is not working as expected while it works fine if I use the same
spec file in my local.

Working code:

from(rabbitmqUri)
      .transform(body().convertTo(String.class))
      
.to("jolt:/specs/securecx-to-pragma-spec.json?inputType=JsonString&outputType=JsonString")

Not Working Code:

from(rabbitmqUri)
      .transform(body().convertTo(String.class))
      
.to("jolt:http://storage.googleapis.com/asia.artifacts.apigee-sample-2021.appspot.com/specs/securecxToPragmaSpec.json?inputType=JsonString&outputType=JsonString";)

Input Json:
{
"ssoId": "b...@cnx.com",
"violationType": "phone",
"violationMessageTitle": "phone detected",
"violationMessageDesc": "phone detected at back"
}

Expected Json:

{
"ssoId" : "b...@cnx.com",
"messageDetails" : {
"title" : "phone detected",
"desc" : "phone detected at back"
}
}



Spec Used:

[
{
"operation": "shift",
"spec": {
"ssoId": "ssoId",
"violationMessageTitle": "messageDetails.title",
"violationMessageDesc": "messageDetails.desc"
}
}
]



Please help in identifying the cause and suggest the solution.
-- 
*Thanks & Regards,*
*Gaurav Verma*

Reply via email to