Utku K
08/28/2024, 9:45 AMstubFor(
get(urlPathEqualTo("/bulk-content"))
.withQueryParam("contentIds", havingExactly("1", "2"))
.willReturn(
aResponse()
.withStatus(200)
.withHeader(CONTENT_TYPE, APPLICATION_JSON)
.withBody(mock)
)
)
but I am getting this error :
com.github.tomakehurst.wiremock.common.InvalidInputException: {
"errors" : [ {
"code" : 10,
"source" : {
"pointer" : "/request/queryParameters/contentIds"
},
"title" : "Error parsing JSON",
"detail" : "{\"hasExactly\":[{\"equalTo\":\"1\"},{\"equalTo\":\"2\"}]} is not a valid match operation"
} ]
}
expected mock : /bulk-content?contentIds=1&contentIds=2
Rafe Arnold
08/28/2024, 9:58 AMRafe Arnold
08/28/2024, 9:58 AMUtku K
08/28/2024, 10:08 AMUtku K
08/28/2024, 10:09 AMRafe Arnold
08/28/2024, 10:24 AMUtku K
08/28/2024, 10:26 AM.withQueryParam("contentIds", havingExactly("1", "2"))
-> this usage from documentation but 1 and 2 came from a list and it can ben 4 and 5 or 6,7,8,9...
do you have any idea ?Rafe Arnold
08/28/2024, 10:29 AMUtku K
08/28/2024, 10:48 AMRafe Arnold
08/28/2024, 11:19 AM