-
-
Notifications
You must be signed in to change notification settings - Fork 773
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
Body in GET/DELETE requests in 3.x #1689
Comments
Hi @AndrianStoikov , Thanks a lot for the detailed issue report! Reading the spec and links you provided, I am indeed inclined to agree that it would make sense for connexion to be as liberal as possible and accept body arguments in
EDIT: Seems like I was mistaken, the excerpt above is from OpenAPI 3.1 and not present in 3.0.3 (source) |
Fixes #1689 Changes proposed in this pull request: - Pass through request body in case of `GET` and `DELETE` requests --------- Co-authored-by: Robbe Sneyders <[email protected]>
Description
Hello,
Since version 2.x connexion does not support body in GET and DELETE requests.
connexion/connexion/operations/abstract.py
Line 283 in e840840
However, many APIs are designed this way and connexion is being too restrictive to API implementations which causes problems with further library updates.
Expected behaviour
IMHO it is best for the library to be as flexible as possible while at the same time promoting correct API design. But currently, it is too restrictive and blocks the projects that have been developed for years to upgrade to a higher version of connexion.
Even the authors of OpenAPI understand that this change is too restrictive
swagger-api/swagger-ui#2136 (comment)
I think it is best if connexion 3.x also reverts to this behavior in order to be more flexible and allow easier transition for projects.
Actual behaviour
Connexion from version 2.x does not automatically parse body in arguments and breaks all endpoints that currently utilize this functionality. I know about the fix of using
connexion.request.json
however this requires changes of many APIs especially of old APIs that have been developed for years.Steps to reproduce
Additional info:
Output of the commands:
The text was updated successfully, but these errors were encountered: