I'm using java -jar wiremock-jre8-standalone-2.32.0.jar --verbose
Here is my mapping
{
"priority":1,
"request":{
"method":"GET",
"urlPath":"/api/arsys/v1/entry/CHG:Infrastructure%20Change",
"queryParameters" : {
"q": {
"matches": "^.*?(?:\b|_)Infrastructure Change ID(?:\b|_).*?(?:\b|_)CRQ000000030315(?:\b|_).*?$"
}
}
},
"response":{
"status":200,
"headers":{
"Content-Type":"application/json"
},
"bodyFileName": "/api/arsys/v1/entry/chginfrastructurechange/CRQ000000030315.json"
}
}
I'm trying to match a GET with params ('Infrastructure Change ID' IN ("CRQ000000030315", "CRQ000000030316"))
The regex matches example here: https://regex101.com/r/oswkUE/1
The verbose out is:
[0:0:0:0:0:0:0:1] - GET /api/arsys/v1/entry/CHG:Infrastructure%20Change?q=(%27Infrastructure%20Change%20ID%27%20IN%20(%22CRQ000000030315%22,%20%22CRQ000000030316%22))
Authorization: [AR-JWT]
Accept: [*/*]
User-Agent: [PostmanRuntime/7.29.0]
Connection: [keep-alive]
Postman-Token: [50954490-5a26-4be0-a526-c61a6e409399]
Host: [localhost:8080]
Accept-Encoding: [gzip, deflate, br]
Content-Type: [application/json]
Matched response definition:
(no response definition configured)
Response:
HTTP/1.1 404
(no headers)
I know the issue is the regex matches because if I change it to .*CRQ000000030315.*
it returns the response, confirming everything else is good. However, I need to match on Infrastructure Change ID
and then CRQ000000030315
anywhere in the param.
Cheers for your time.