We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Source format: OpentAPI(https://swagger.io/specification/) Destination format: Pact(https://github.com/pact-foundation/pact-specification/tree/version-3)
Example Source OpenAPI file:
openapi: 3.0.0 info: title: Product Service API version: 1.0.0 paths: /products: get: summary: Get all products responses: '200': description: A list of products content: application/json: schema: type: array items: $ref: '#/components/schemas/Product' /products/{id}: get: summary: Get product by ID parameters: - name: id in: path required: true schema: type: string responses: '200': description: A product object content: application/json: schema: $ref: '#/components/schemas/Product' components: schemas: Product: type: object properties: id: type: string name: type: string required: - id - name
Destination Pact-file:
{ "consumer": { "name": "ApiClient" }, "interactions": [ { "description": "Get product by ID", "request": { "method": "GET", "path": "/products/10" }, "response": { "body": { "id": "10", "name": "Test" }, "matchingRules": { "$.body": { "match": "type" } }, "status": 200 } }, { "description": "Get all products", "request": { "method": "GET", "path": "/products" }, "response": { "body": [ { "id": "09", "name": "Test" } ], "matchingRules": { "$.body": { "match": "type", "min": 1 } }, "status": 200 } } ], "metadata": { "pact-js": { "version": "12.1.0" }, "pactRust": { "ffi": "0.4.19", "models": "1.1.19" }, "pactSpecification": { "version": "2.0.0" } }, "provider": { "name": "Product Service API" } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Source format: OpentAPI(https://swagger.io/specification/)
Destination format: Pact(https://github.com/pact-foundation/pact-specification/tree/version-3)
Example
Source OpenAPI file:
Destination Pact-file:
The text was updated successfully, but these errors were encountered: