-
-
Notifications
You must be signed in to change notification settings - Fork 526
RequestBody in GET requests are rendered as query parameter #1003
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
springdoc-openapi only supports OpenAPI 3, where : There are some workarounds, but you will get invalid spec... |
@bnasslahsen RFC 7231 is now obsolete, RFC 9110 is published on June. https://www.rfc-editor.org/rfc/rfc9110.html#section-9.3.1-6 This section now says;
What do you think about this? |
We support OAS 3, which clearly states: GET, DELETE and HEAD are no longer allowed to have request body because it does not have defined semantics ... |
Describe the bug
I know it's uncommon for GET requests to have a RequestBody, but sometimes the payload can be quite large for the query parameter in the URL to handle it. Using a RequestBody makes more sense, but the generator does not render it. Instead a query parameter entry is there and when executed in the Swagger UI the following exception is thrown:
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Screenshots
Some Swagger UI screenshots from the actual API
The 'old' Springfox-GET

The 'new' GET

The 'new PUT

The text was updated successfully, but these errors were encountered: