Every Pact matching rule in hosted verification
The hosted verifier now applies every matching rule of Pact specifications 2, 3 and 4, and it is tested against every response case of the Pact specification test suite. See Supported matching rules.
- Binary responses. A
contentTyperule judges an image, a PDF or another binary response by its bytes, not by theContent-Typeheader the provider sends. Any JPEG matchesimage/jpeg; a PNG does not. - The same answers as other verifiers. A
regexmust match the whole value, not just a part of it. A pact that records an empty body (""ornull) accepts only an empty response. AnAcceptheader ignores the case of its parameters, asContent-Typealready did. - Generators are ignored. They tell a mock server how to fill a value in; the matching rules alone decide what the provider may return.
- Nothing passes silently. A rule Apiome cannot apply, such as a rule on an element of an XML body, still fails the interaction and names the rule.
A pact whose regex only matched part of a value, or that recorded "body": null for a response
that has a body, now fails where it passed before. Fix the expression, or remove the empty body
from the consumer's test.
