Sugi S
04/17/2023, 3:36 PMSugi S
04/17/2023, 3:38 PMresponses:
'200':
description: User found
content:
application/vnd.api+json:
schema:
"$ref": "#/components/schemas/UserResponse"
schemas:
UserResponse:
type: object
properties:
data:
"$ref": "#/components/schemas/User"
included:
type: array
items:
anyOf:
- type: object
properties:
id:
type: string
type:
type: string
-type: object
properties:
name:
type: string
type:
type: string
required:
- data
Sugi S
04/17/2023, 3:38 PMYousaf Nabi (pactflow.io)
[{"id":"foo","type":"bar"]
or
[{"name":"foo","type":"bar"]
If you have a client generating a pact file that only tests for one of those cases [{"id":"foo","type":"bar"]
, they many never received the other anyOf object in this case as we wont have verified it`[{"name":"foo","type":"bar"]`
in regular consumer driven testing for pact, you would use provider states and an actual verification of the provider to assert that when the provider was capable of providing both types of responses that consumer has required
Have you seen any issues in verifying the contract, and how are you deferencing your OASSugi S
04/17/2023, 5:02 PMYousaf Nabi (pactflow.io)
npx
https://github.com/YOU54F/oas-merge