D
03/04/2025, 1:06 AMpublic enum defaultSettlementMethod
{
Method1= 1,
Method2 = 2,
}
In the OAS spec, it shows as "Allowed Values 1 2" (see screenshot)
I would like to be able to check in the consumer that it is these values only, rather than have an integration test for this. Is that possible?
I know it probably goes against the philosophy of Pact to do this. However in the past we have found that providers may add new values to the enums, and the consumers weren't expecting the change.
Adding any kind of test in the provider may still result in the outcome, because this still relies on the provider team communicating the change effectively.
Hope that makes sense?Matt (pactflow.io / pact-js / pact-go)
D
03/04/2025, 4:41 AMD
03/04/2025, 5:28 AMMatt (pactflow.io / pact-js / pact-go)
D
03/04/2025, 8:48 PMEddie Stanley
03/05/2025, 2:18 AMopenapitools/openapi-diff - with --fail-on-incompatible
Interestingly, it would probably be easier to add this kind of functionality to bi-directional contracting in Pact (c.f. consumer-driven contract tests). However you then miss out on the benefits that CDDT has with contract-by-example (I guess that's the reason the docs kind of frame bi-directional contract testing as the "gateway drug")Matt (pactflow.io / pact-js / pact-go)