Skip to content
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

Response Description #272

Closed
eilst opened this issue Jan 26, 2021 · 3 comments
Closed

Response Description #272

eilst opened this issue Jan 26, 2021 · 3 comments

Comments

@eilst
Copy link

eilst commented Jan 26, 2021

# Description is required by spec, but descriptions for each response code don't really

Can we still add a custom description for a Response?
I tried and it is displayed in the schema of the response and not in the main Response description.

@tfranzel
Copy link
Owner

the key question here is: how and where should it be added? it isn't clear to me.

we use description for operations, components and some other places. that specific description is on a status code level. i can see that this may be useful for error description, but that is supposed to be solved with a different feature in the future.

@eilst
Copy link
Author

eilst commented Jan 28, 2021

I found that is is possible to add an example (examples= [OpenApiExample...) with a description and linked it to a specific status_codes. So that was enough for me.

For a simple error description it can be helpful like you said to be able to do it.

@tfranzel
Copy link
Owner

tfranzel commented Jan 29, 2021

sounds good! i'll close this because you found a way, and we may have a more structured approach once the error feature is implemented (#101)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants