Hi all, my team and I are looking into what is the...
# general
n
Hi all, my team and I are looking into what is the best way to split the creation of contracts between consumers and providers, let me elaborate. We have a monorepo for the consumer (front-end) and several different provider services, do we create one pact file for each controller or for each endpoint? There are countless ways to go about creating contracts between the providers and the consumer but I'd like to hear what everyone else thinks about this?
j
I think the way Pact works is to create a contract file for each version of each consumer -> provider pair (versioned based on the consumer's version number so that it can verify it against an arbitrary version of the provider to check if those two versions of those services work together)
👍 1
m
The simplest pathway is to create contracts between independently deployable units
☝️ 1
Controllers is probably not the right abstraction
(just about to hop on a plane, sorry for quick response)
n
I am still a little unclear about this, what do you mean by independently deployable units in this case? How could I group contracts per controller or per API version?
t
an independently deployable unit is the thing that is versioned in your version control. If you run a deployment, what is deployed?
If you have two controllers in the same service, they are deployed together , as a unit
if you have two different services deployed separately, they are different units