Kwee H Tan
09/20/2023, 3:15 AMMatt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
The reason the pact file exists is to ensure the tests in both projects are kept in sync - it is not an end in itself.The contract itself isn’t the end - the safety you get from the process is the ends game. Of course, the artifact is critically important to this process.
In fact, it would not matter who/what created the contract file.In a way, yes, but an OAS (if this is what you’re interested in persuing) is not a contract in the way Pact would define it. See the link below (schemasarenotcontracts) for a detailed exploration of that topic
Slackbot
09/20/2023, 3:41 AMKwee H Tan
09/20/2023, 3:42 AMKwee H Tan
09/20/2023, 3:47 AMKwee H Tan
09/20/2023, 3:53 AMBoris
09/20/2023, 4:14 AMMatt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
I am both referring to the line about the pact file not being an end to itself and the opinion that writing the Pact file directly or converting from Swagger is not a good idea.If you can guarantee (to some level of accuracy) that both consumers are providers do indeed match the contract (however it is generated), then you are certainly in a good space. The problem is, OAS and other hand cranked contracts, are usually too abstract to be meaningful in reasoning about how it is used (consumer part) and if the provider supports it (provider part). Of course, Pact and consumer-driven contracts give you many other benefits - eg knowing which parts of the interface the consumer actually uses, ability to evolve over time, specification by example, network diagrams of relationships etc.
Boris
09/20/2023, 5:34 AMMatt (pactflow.io / pact-js / pact-go)
Kwee H Tan
09/21/2023, 5:45 PMBoris
09/22/2023, 12:11 AMBoris
09/22/2023, 12:13 AMKwee H Tan
09/22/2023, 5:21 PMKwee H Tan
09/22/2023, 5:23 PMBoris
09/25/2023, 2:35 AM