Brian Trezise (phoenixhawke)
11/13/2024, 4:28 PMwiremock.stubFor(
get(urlPathEqualTo(teamMembershipUrl))
.withQueryParam("after", equalTo(after))
with the second stub omitting the query parameter. Unfortunately what I'm actually hitting is that all requests are hitting the stub that omits the query parameter every time, which results in an infinite loop in my service code.
So I guess the question here is, is there a better way to do this or do I need to rely on another response transformer?Lee Turner
11/13/2024, 5:00 PMabsent
matcher work in this instance ?
{
"mappings": [
{
"request": {
"urlPath": "/thing/1",
"method": "GET",
"queryParameters": {
"after": {
"equalTo": "4"
}
}
},
"response": {
"status": 200,
"body": "Body content for stub with after parameter"
}
},
{
"request": {
"urlPath": "/thing/1",
"method": "GET",
"queryParameters": {
"after": {
"absent": true
}
}
},
"response": {
"status": 200,
"body": "Body content for stub without after parameter"
}
}
]
}
Brian Trezise (phoenixhawke)
11/13/2024, 5:01 PMLee Turner
11/13/2024, 5:02 PMBrian Trezise (phoenixhawke)
11/13/2024, 5:05 PMBrian Trezise (phoenixhawke)
11/13/2024, 5:06 PM