-
Notifications
You must be signed in to change notification settings - Fork 9k
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
GET request do not allow a body #5388
Comments
https://tools.ietf.org/html/rfc7231#section-4.3.1 :
|
@pavlus as far as i understand this, this mean that a server does not need to implement this, not that the spec forbits it. So if the backend application is been able to do it, its ok todo so. |
@dominikzogg, we've had a lot of discussion around this.
most of all, you should pay attention to what happens in OAI/OpenAPI-Specification#1937, as it's looking like OpenAPI 3.0.3 could support your use case. for now, Swagger UI doesn't support this, because we're waiting on OpenAPI to make a final decision and release a new version of the specification. the tickets I've linked to contain, probably, more info than you care to know about why we do things that way 😄 closing for now -- let me know if you have any lingering questions! |
@shockey thanks for the additional information, issue at this level is solved so far |
Apparently, If swagger sticks to the OpenAPI standard, we should avoid using swagger with Spring MVC, since Spring MVC allows GET request with a body. |
Has there been any follow up on this? OpenAPI did end up allowing a request body on GET requests. Should this be re-opened? |
Indeed, see OAI/OpenAPI-Specification#2117 IMHO this issue should be reopened to keep in line with the OpenAPI specs. |
Yes Please reopen |
using .NET swashbuckle.AspNetCore.SwaggerUI 6.2.2 and have the same error. |
I'm also voting for reopening this since it's becoming quite common to use get requests with body |
+1 |
5 similar comments
+1 |
+1 |
+1 |
+1 |
+1 |
Q&A (please complete the following information)
Content & configuration
Example Swagger/OpenAPI definition:
Describe the bug you're encountering
As far as i understand the http specs, sending a body is also valid in a GET call.
Cause E-Mail Addresses are privacy relevant, we don't like to have it in the URL (as path part or query parameter).
This endpoint does not modify anything, so POST is not a correct method to do so.
The text was updated successfully, but these errors were encountered: