-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plan to support Pact v4 #45
Comments
👋🏾 Hey Matthew!
Glad you find it useful, feedback is always good :)
Pact-JVM should support verifying up to and including V4 pact files, so that sounds like a separate issue best raised in the pact-jvm project.
With regards to supporting additional specifications in the adapter, it would be preferable to at some point support V4 in all of our languages by default. We have been making good strides in bringing the clients libraries. The adapters are a bit of a periphery, the main use case is in bi-directional contract testing, where the generated contracts are statically compared against an OpenAPI document. The tool used for comparison supports V2-V4 Pacts, but doesn't support traditional CDCT techniques such as provider states or matchers (schema matching is performed by default). That being said, the route to V3/V4 spec in the adapters, is certainly manageable for someone as a community contribution general adapter guidance:- https://docs.pactflow.io/docs/bi-directional-contract-testing/contracts/pact#converting-mocks-into-a-pact-compatible-format pact v4 spec compat:- https://docs.pactflow.io/docs/bi-directional-contract-testing/contracts/pact#supported-pact-specification-versions See caveat about v4 pacts The pact serialisation function is here pact-cypress-adapter/src/utils.ts Lines 63 to 77 in ac177d7
which creates the structure which adheres to a pact v2 specification. we provide typed schemas for the pact specification here https://github.com/pactflow/pact-schemas which can be used to validate the created pact if required (can definitely help during development) We would want to expose an ability to set the pact specification version, and have it default. |
Thanks @swimclan, the purpose of this is to work with PactFlow's BDCT feature (as noted) so we only require a minimum of v2 for this - but v4 support should be fairly straightforward if you'd (or somebody else) would like to add it. |
Hi! Thanks for this useful library!
Would there be any plan in the near future to migrate support to 4.0? We are trying to use the Java adapter for the provider side and the validation method seems to default to 4.0 which is causing some incongruence with our process.
Thanks again!
The text was updated successfully, but these errors were encountered: