Dhaval Dongre
05/23/2024, 9:20 PMMatt (pactflow.io / pact-js / pact-go)
The service under test already has an OpenAPI spec and the team was wondering if it is worth to write a Provider test instead of just using the validator toolthis could imply you aren’t going to test your provider at all, so just for clarity, you absolutely still need to ensure your OAS is implemented by your actual API (you can do that without Pact, of course). But it’s a critical step. A provider contract (in this use case) is the combination of the OAS + test results (evidence) to show it works. The OAS alone is just a document that could be created out of thin air. Have a read of https://docs.pactflow.io/docs/bi-directional-contract-testing#comparison-to-pact and see what you think, it talks about the tradeoffs of the approaches. PactFlow integrates this into the system more deeply if you’re interested in a service that packages it all up neatly for you