Closed lality90 closed 1 week ago
fromRequest().body('address').each { add ->
def resultObject = [
processStatus: 'CREATED',
address: "${add}"
]
results.add(resultObject)
}
return results
}()
That was never intended to work like this. fromRequest()
will be transformed to WireMock's json path reference. I didn't even know you can do some each(...)
etc. :P
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.
I have a scenario where if a request has 1 element in the array then return 1 object in response and similarly if the request has n elements respond with n objects, But I am unable to create such a response.
Contract package contracts
import org.springframework.cloud.contract.spec.Contract
//Expected Response
//Actual Response