You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 6, 2022. It is now read-only.
I am using wiremock to stubbing the requests. I have created a json file to stub a request:
{
"request": {
"method": "POST",
"urlPath": "/nested/transform",
"bodyPatterns": [
{
"matchesJsonPath": "$.names.[0].['first']"
},
{
"matchesJsonPath": "$.names.[0].['last']"
}
]
},
"response": {
"status": 200,
"body": "{"firstName": "$(names[0].first)", "lastName": "$(names[1].last)"}",
"headers": {
"Content-Type": "application/json"
},
"transformers": ["body-transformer"]
}
}
My request and response are as below:
{
"names": [
{
"first": "Vijay",
"last": "Rajput"
}
]
}
Receiving response is -
{
"firstName": "[{first=Vijay, last=Rajput}]",
"lastName": "[{first=Vijay, last=Rajput}]"
}
Expected response is -
{
"firstName": "Vijay",
"lastName": "Rajput"
}
Is it possible to fetch?
The text was updated successfully, but these errors were encountered: