Slackbot
03/20/2023, 1:31 PMAaron
03/20/2023, 1:53 PMcuId
value.Aaron
03/20/2023, 1:54 PMmatchesJsonPath
part is working, and you aren’t matching a separate mapping?Danny Paniagua
03/20/2023, 1:54 PMwiremock-jre3-standalone
2.35.0
Danny Paniagua
03/20/2023, 1:56 PMAaron
03/20/2023, 1:57 PMDanny Paniagua
03/20/2023, 1:58 PMAaron
03/20/2023, 1:59 PMDanny Paniagua
03/20/2023, 2:01 PM{
"name": "installment_mapping",
"request": {
"method": "POST",
"url": "/lender",
"headers": {
"Content-Type": {
"equalTo": "application/json"
}
},
"bodyPatterns": [
{
"matchesJsonPath": "[?($.lender-type== 'installment')]"
}
]
},
"response": {
"status": 200,
"headers": {
"Content-Type": "application/json"
},
"bodyFileName": "{{#eq (jsonPath request.body '$.cuId') '1234'}}response_file_A.json{{else}}response_file_B.json{{/eq}}"
}
}
Was actually about to ask if the full mapping file might help 😂
The request body is
<http://localhost:8080/partner-service/lender>
{
"firstName": "Danman",
"lastName": "Mandan",
"lender-type": "installment",
"cuId": 1234
}
Danny Paniagua
03/20/2023, 2:03 PMcuId
from int to string in the request payload triggers the correct response 🤦Danny Paniagua
03/20/2023, 2:06 PMAaron
03/20/2023, 2:11 PMDanny Paniagua
03/20/2023, 2:14 PM