Matt (pactflow.io / pact-js / pact-go)
anyOf
oneOf
and allOf
, including for use cases in composition, inheritance and polymorphism. These changes improve the guarantees, including ensuring the use of discriminator
is correct (instead of ignoring the invalid setup), and simplify the setup previously required to make this work the way you would expect.
⚠️ The validation has improved in this release which may cause some tests that were previously passing to now fail. This is a good-bad thing. Good, because we have improved the guarantees, bad because you will need to update your tests to cater for this. See the changelog for advice on addressing these errors ⚠️
For a full review of the OAS features we support, see 👉 https://docs.pactflow.io/docs/bi-directional-contract-testing/contracts/oas/features.
We have also made a number of updates to our documentation, which is much more comprehensive than before including improved “how to fix” compatibility errors, detailed breakdown of our supported features and an overview of how we support keywords (an area that seems to trip people up the most)
Lastly, we have created a helpful repository of example OpenAPI documents and pact files that can be used to better understand how the features and capabilities translate to real life. This should help bring to life the theoretical documentation.
If you have any questions or comments please feel free to respond to this thread, we’d love to hear from you👂