Closed gaeljw closed 2 years ago
I am also seeing the same problem where an array link makes the contract indecipherable, resulting in pipeline failures from the pact verification step.
This is a critical blocker for our pipelines. I've done some debugging and it seems that the pb:consumer-versions
array-type field was only very recently added to the response from the broker.
I've raised a PR to remove this field from _links
when decoding the pact, which should provide an interim solution to the problem until the Links
type can be updated to correctly support both single-valued and multi-valued links: #233
More info/discussion on the Pact foundation slack: https://pact-foundation.slack.com/archives/CLS16AVEE/p1635324284042200
thanks @jbwheatley - can confirm this is fixed by v4.3.0! 😄
The
Pact
case class is defined as the following:This does not match the actual response of Pact Broker where sometimes a link is actually an array.
Example of JSON not matching the case class:
This results in a response from Pact Broker being unparseable and unable to use.
Context: trying to use
verifyPact.withPactSource(pactBrokerWithVersionSelectors(...))
Am I missing something?