I have a requirement where I need to handle invalid requests. I want to negate a url pattern in contract request, which is a groovy file. e.g.:
url value(consumer(regex('/employee/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}')))
Here, I want to handle all request which doesn't match the uuid regex pattern. Is there any way by which I can do this?
Instead of hacking this around create 2 contracts.
the higher value of priority the smaller the priority. That means that if there are 2 matching contracts for that URL, the first stub will be picked.