Hi :wave: We're using PactFlow and have created a ...
# pactflow
s
Hi đź‘‹ We're using PactFlow and have created a custom interaction type for Microfrontends, where we generate Pact V4 files ourselves (without using the standard Pact tooling), following the official spec. These interactions are added under the
interactions[]
array in the pact file, using a custom
type
and domain-specific fields in place of `request`/`response`. Our PoC showed promising results, and we'd now like to validate whether this is a supported and future-proof approach before rolling it out more broadly. Our main concern is whether PactFlow will continue to support contracts that contain custom interaction types and properties — or if there's a risk that the broker might reject these files in future versions. Does this sound like a safe path to go down? Thanks!
m
Cool! Would be interested in getting wider demo at some point (and more background, if you care to share?) The short answer is the Pact Broker supports pretty much any JSON content as a “contract” (it doesn’t look at the contents of the file in 99% of cases). So yes, it should be supported. PactFlow follows the same approach, although it has a more complex UI. I can’t be sure to say the UI won’t behave badly in some places, but the APIs should be stable. Obviously you might find issues with it rendering nicely in the UI, but that’s to be expected. Hope that answers the question?
Are you adding non-pact interactions to a pact file? Or are you purely using the broker to exchange a custom contract?
s
Thanks — that’s super helpful! The UI isn’t a concern for us, we're mainly focused on the contract exchange and verification workflows. To answer your question: we're purely using the broker to exchange a custom contract. We generate Pact V4 files that only contain our custom interaction type (e.g.,
type: "custom/remoteComponent"
), so there are no standard HTTP or message interactions in those files. The broker is just used as a distribution and versioning mechanism between teams. We do have other teams using the standard HTTP Pact use case as well, and part of our motivation was to expand the usage of the broker so we can rely on the same workflow and tooling across the board.