Closed vini46 closed 6 years ago
I have released version 0.0.9 that hopefully will work for you
Just as an aside, as query parameters are always strings, using somethingLike('1')
will match all query parameter values. Probably better to use a regex matcher to ensure they are numbers.
I have a interaction which expects the following request,
withRequest: { method: 'GET', path: '/api/objects', query: { page: somethingLike('1') } }
the pact file generated for this interaction has the following matchers,
"Get object", "request": { "method": "GET", "path": "/api/objects", "query": "page=1", "matchingRules": { "$.query.page[0]": { "match": "type" } } }
while using the stub server, i am getting the response only when i make the call with "/api/objects?page=1", when i change the request parameter value ""/api/objects?page=2" it is not getting matched, because of which no response is returned.
Please find below the logs from pact-stub-server,