-
Notifications
You must be signed in to change notification settings - Fork 9.1k
Request with GET/HEAD method cannot have body #2867
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
@pinoy4 - we understand the pain that this may cause for some API designs, however this is not going to change. We cannot go out of bounds of what the spec allows, and it does not allow it. There are other features that people wish existed, and when they don't they can't describe their APIs using Swagger/OpenAPI. However, we will never get to the point where we cover 100% of API designs. |
The spec does not forbid this.
I have confirmed this interpretation with the committee if you check the
mailing list.
…On Apr 6, 2017 9:58 AM, "Ron" ***@***.***> wrote:
@pinoy4 <https://github.com/pinoy4> - we understand the pain that this
may cause for some API designs, however this is not going to change. We
cannot go out of bounds of what the spec allows, and it does not allow it.
There are other features that people wish existed, and when they don't they
can't describe their APIs using Swagger/OpenAPI. However, we will never get
to the point where we cover 100% of API designs.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2867 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABEOBbCpgQdvlU_3ot-R_wrx8narV9DZks5rtRmrgaJpZM4M1SO->
.
|
The Swagger/OpenAPI spec forbids this. |
@ehartford regardless, if you want to point me to the post in the mailing list bringing it up, I can raise it as a concern with the OpenAPI spec. |
@webron I know your goal is not to support 100% possible cases, especially since the OpenAPI spec doesn't have this goal (and I agree it should not be it's goal). |
Version 2.0 wasn't clear about it, but for the moment, 3.0 is. From the Operation Object:
This is not a decision we can simply flip here in the project. FWIW, out of the votes, I was the only one opposed to the change, and we go with majority (as we should). This is why I've asked @ehartford for a reference to the mailing list, as that information may be enough to turn the decision (it's technically not too late). However, as long as the decision remains, we will not support it in Swagger-UI. |
Thank's for the link. I didn't give enough attention to that table, my bad. |
I am opening this issue to address this problem.
It has already been reported in issue #2136 but that issue is closed.
From what I understand it has been closed by @fehguy stating:
If I am seeing the bigger picture here this statement refers to RFC 2616, section 4.3 which was the standard until June 2014 when it was superseded by RFC 7230, section 3.3 and RFC 7231, section 4.3.1.
This has already been mentioned in the previous issue (#2136) by @ehartford but no response was given.
I am aware that the use of a body in a GET request still should be limited when designing endpoints but it should definitely NOT be prohibited. I would like to understand what the reasoning behind explicitly prohibiting this is as @webron said (again in #2136):
Please understand that this decision is very limiting to some of us as we are forced to choose between implementing our APIs differently from what we believe is the best way and using swagger to document it (and enable the "Try it out" feature).
Thank you very much for your time,
Francesco
The text was updated successfully, but these errors were encountered: