Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Current implementation supports the Pact v2 format, using pact-jvm 2.4.18. There is however a newer format that introduces additional features such as new matcher format, new query parameters format and matching on query parameters.
I'm in particular interested in using matchers on query parameters. For example being able to write:
Pact v3 is already supported by latest pact-jvm. I've tried to simply update the pact-jvm field to another version but it seems this is not sufficient. Is there a way to support Pact v3 or does it also require code changes in spring-cloud-contract ?
That's a very interesting issue! Thanks for filing it... So we already support query parameters from what I see (https://github.com/spring-cloud/spring-cloud-contract/blob/master/spring-cloud-contract-tools/spring-cloud-contract-spec-pact/src/main/groovy/org/springframework/cloud/contract/verifier/spec/pact/PactContractConverter.groovy#L61) but not with matchers. It seems that it will require not change of the code but actually introducting new one if Pact v3 is not compatible with Pact v2 (or is it?).
So what you should do in my opinion is to write your own support for Pactv3 and file a PR back to Spring Cloud Contract :) Thanks to the pluggable architecture (http://cloud.spring.io/spring-cloud-static/Dalston.SR3/#_custom_contract_converter) you don't have to wait for me to implement anything and you can do it yourself. What I suggest is to copy the class and the test, modify it to the Pact v3 format and it's enough for you to create a file in