https://github.com/pactflow/bdct-oas-examples
BDCT examples for OpenAPI documents with logical keywords
https://github.com/pactflow/bdct-oas-examples
contract-testing examples openapi pactflow
Last synced: 11 months ago
JSON representation
BDCT examples for OpenAPI documents with logical keywords
- Host: GitHub
- URL: https://github.com/pactflow/bdct-oas-examples
- Owner: pactflow
- License: mit
- Created: 2023-05-24T07:09:00.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2025-02-13T06:32:48.000Z (about 1 year ago)
- Last Synced: 2025-02-13T07:30:18.721Z (about 1 year ago)
- Topics: contract-testing, examples, openapi, pactflow
- Homepage: https://docs.pactflow.io/docs/bi-directional-contract-testing
- Size: 39.1 KB
- Stars: 1
- Watchers: 9
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PactFlow BDCT examples
This repository showcases use cases and features in OpenAPI, how they are compared to pact files and in some cases, how to ensure you get the most out of the comparison checks.
| Example | Problem |
|---------|---------|
| [`oneOf`](./examples/oneOf) | How to properly use `oneOf` logical operator |
| [`anyOf`](./examples/anyOf) | How to properly use `anyOf` logical operator |
| [`inheritance`](./examples/inheritance) | How to properly use `allOf` with `discriminator` to leverage schema inheritance |
| [Media Types](./examples/mediaTypes) | How to use [media types](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) on requests to differentiate request body schemas, using the `Content-Type` header |
| [Content Negotiation](./examples/contentNegotiation) | How to use [content negotiation](https://developer.mozilla.org/en-US/docs/Web/HTTP/Content_negotiation) on responses to differentiate expected response body schemas, using the `Accept` header |
| [Security](./examples/security) | How to use Authentication and [security schemes](https://swagger.io/docs/specification/authentication/) |
| [Parameters](./examples/parameters) | Understanding request [Parameter](https://swagger.io/docs/specification/describing-parameters/) use cases |
| [Forms, Uploads and Binary](./examples/forms) | Forms, uploads and binary [request content](https://swagger.io/docs/specification/describing-request-body/) use cases |
| [XML](./examples/xml) | XML content use cases |
| [Servers](./examples/servers) | How to test with the use of `servers` |
| [Negative Testing](./examples/negative) | How to test negative scenarios such as `40x` and `50x` responses |
| [Additional Properties](./examples/additionalProperties) | How to allow `additionalProperties` in your types |