Hey there! We are currently writing a POC for pact...
# general
d
Hey there! We are currently writing a POC for pact to test the tool in-house. We already have written a provider & consumer with jvm which support pact specification V4. Now we startet to write a consumer with pactJs which only support pact specification V2. So we were wondering if it could cause problems when consumer write pacts in different specification versions or is this something which handles the broker/pactflow by itself? Thanks.
👋 1
m
Good question Daniel.
Basically, it’s the provider that’s the lowest common denominator
d
Thank you for the fast feedback.
m
Sorry, didn’t finish (just joined a meeting 😛 )
So, the spec version matters most to the provider
so if a consumer publishes a contract in V3 or V3 but the provider only supports up to V2, it won’t work
You can still specify the version to serialise in the consumer too. So if you are using Pact JVM which can produce V4 pacts, you can still set the consumer tests to generate a V2 pact
d
Are downwards compatible? So when the consumerA writes pacts in V4 & consumerB writes them in V2. Can the provider support both versions or should all parties use V2 then?
m
Yes, it can verify V4 and below in that example
so the consumers don’t need to be compatible with the same version
🙏 1