You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to define an API to allow the client to accept either application/json or application/problem+json for responses; they share the same schema and description. At present, I must copy/paste the Media Type Object each time, rather than define it oncereuse one
That is, I must code:
'400':
description: Bad Requestcontent:
application/json:
description: {My description of the response}schema:
$ref: '#/components/schemas/problemResponse'application/problem+json:
description: {My description of the response}schema:
$ref: '#/components/schemas/problemResponse'
when I'd really like to do is
'400':
description: Bad Requestcontent:
application/json:
description: {My description of the response}schema:
$ref: '#/components/schemas/problemResponse'application/problem+json:
$ref: '#../application~1json'
Maintaining copies is not scalable, especially if one uses Specification Extensions inside the media type object
Each operation's 400 response (or each 422 response, etc) may differ (error descriptions change) so using a $ref for the entire Response Object is not a complete solution.
The text was updated successfully, but these errors were encountered:
I'd like to define an API to allow the client to accept either
application/json
orapplication/problem+json
for responses; they share the same schema and description. At present, I must copy/paste the Media Type Object each time, rather than define it oncereuse oneThat is, I must code:
when I'd really like to do is
Maintaining copies is not scalable, especially if one uses Specification Extensions inside the media type object
Each operation's 400 response (or each 422 response, etc) may differ (error descriptions change) so using a
$ref
for the entire Response Object is not a complete solution.The text was updated successfully, but these errors were encountered: