-
Notifications
You must be signed in to change notification settings - Fork 9.1k
[enhancement] reuse response description #1741
New issue
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
Comments
@ggirodda I think you can just do ...
responses:
'200':
$ref: '../index.yaml#/components/responses/200Ok'
|
Thank you for your answer, I really had to explein it better, sorry. My problem is that every time I have a response, with 200 or 201 or other commons response code, I have to put the response description for each response, I just want the description to be shared between responses, because the content (the message) is always the same. I want to avoid to repeat every time this on my responses:
Because if one day I want to change the description of responses with code 200, I have to find and replace it on every file. |
@ggirodda as you suspect, this is not currently possible up to OpenAPI 3.0.x (there is an issue for tracking the way The major issue is that a Reference Object is just that, an object containing a The overlay proposal (specifically that in OAI/Overlay-Specification#36) might well allow you to do this by specifying an |
I really wish Description wasn't required. |
@webron @whitlockjc another |
This is a subset of issue #2697, so I'm going to close it in favor of that issue (which has more discussion). |
Uh oh!
There was an error while loading. Please reload this page.
Hello,
First of all I want to thanks the openAPI community.
I really appreciate the standard, it really helps the communication between back and front developers. I tried to reuse response description in this way:
It seems that it's not a valid syntax even if it works well on swagger-ui
I think that it will be helpful to share the response description between different responses, avoiding to repeat the same message everytime.
The text was updated successfully, but these errors were encountered: