-
Notifications
You must be signed in to change notification settings - Fork 29
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
How to generate the Response Body API documentation without using Response decorator? #56
Comments
Using a modified decorator is the easiest way. This isn't a use case that I think should be handled in this library, as it makes it easy for the documentation and the actual response to be out of sync. The idea of the |
I had a similar use case where I wanted to document streaming file responses. I was able to get it to work by not using the Any thoughts on this? |
Handling special documentation needs in the |
I want to document the Response body in the API documentation of the view function but I can not use the Response decorator since the response is already parsed and using the Response decorator raises the following exception.
RuntimeError: The @response decorator cannot handle Response objects.
To solve the issue, I modified the Response decorator, and instead of raising an Exception when a Response object is encountered, I returned the object.
This works fine now but is there any better way to do this?
The text was updated successfully, but these errors were encountered: