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
Don't validate streamed responses #1259
Don't validate streamed responses #1259
Conversation
Hi @cshorler, thx for the PR. Hopefully you're still interested in merging this :) In the perfect case, we might want to try to validate the response in a streaming fashion, but this already looks like an improvement. I see two downside as well though:
I think we can address this by logging a warning about this when we skip validation. Also, we moved to the main branch, so can you please rebase and change the target of your PR? |
Also, since |
e00e609
to
c78f523
Compare
Fixes #401 as well |
Pull Request Test Coverage Report for Build 1820352240
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
This is currently only for flask. For aiohttp, we might need to check what the response class is (https://docs.aiohttp.org/en/stable/web_reference.html#response-classes) but I'm not that familiar with aiohttp myself
71ead39
to
7191b9c
Compare
* rework PR spec-first#467 - don't attempt to validate streamed responses * Add is_streamed property to ConnexionResponse * Adhere to response.direct_passthrough * Add test for file response validation * Add warning about skipping validation for streamed response Co-authored-by: Robbe Sneyders <robbe.sneyders@ml6.eu>
prior to validation get_connexion_response ultimately calls response.get_data()
I haven't found a workaround for this and the old PR was closed due to inactivity.
I changed it to use getattr as the object may not be a response (could be tuple).
Fixes #904 .
there are also a few other issues raised.
Changes proposed in this pull request: