Open mefellows opened 9 months ago
👋 Hi! The 'smartbear-supported' label has just been added to this issue, which will create an internal tracking ticket in PactFlow's Jira (PACT-1435). We will use this to prioritise and assign a team member to this task. All activity will be public on this ticket. For now, sit tight and we'll update this ticket once we have more information on the next steps.
See our documentation for more information.
From https://swagger.io/specification/v3/?sbsearch=readOnly
That is, attributes marked as "readOnly" in a shared model between request and response bodies should only be part of the response,
writeOnly
attributes should only be part of the request body.The validator currently does not consider these attributes, which makes it hard to re-use models on the request and response.
Given this model:
An error will show if the
created_at
property is not in the request, despite it being aread-only
property:Workaround
The workaround is to separate request and response schemas, perhaps using other composition capabilities of JSON schema.