Deepak Shakya
01/20/2023, 8:46 AM/endpoint/customers/abc123
/endpoint/customers/abc456
For requests that come for the above paths (/endpoint/customers/abc\d+
), I want the mocks to be used. For anything else, it can routed to the proxy. Here is how I am trying to configure the proxy.
{
"request": {
"method": "ANY",
"urlPattern": "/endpoint/customers/(?!abc\\d+)"
},
"response": {
"proxyBaseUrl": "<http://real-customer-endpoint/api>",
"proxyUrlPrefixToRemove": "/endpoint"
}
}
But this doesn't seem to work. Am I missing something or this is not possible?
Also, what are your thoughts on having the inverse filters likes urlPatternNotMatching and urlPathPatternNotMatching as I suggested them here - https://github.com/wiremock/wiremock/issues/2068Rob Elliot
01/20/2023, 9:31 AMANY /.*
proxy at priority 10 to the real API and then adding new functionality in specific stubs.Deepak Shakya
01/20/2023, 10:18 AMRob Elliot
01/20/2023, 5:21 PMnotMatching
regex inverter but there's no way to apply it to a url at the moment, only query params, headers & the body.
Seems a reasonable ask; will look into it.