I defined query parameter in my contract. I need this parameter to be optional:
method 'GET'
url($(regex(urlRegex))) {
queryParameters {
parameter 'fitler': $(stub(regex(filterRegex)))
}
}
I want this contract to be suitable for the both URLs with filter like /my/sample/url?fitler=some-filter-expression
and without the filter param like /my/sample/url
.
How can I achieve this? Is this even possible?