-
-
Notifications
You must be signed in to change notification settings - Fork 523
@RequestBody
not working for @GetMapping
endpoints
#2775
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
@RequestBody
not working for @GetMapping
requests@RequestBody
not working for @GetMapping
endpoints
springdoc-openapi v1.8.0 is the latest Open Source release supporting Spring Boot 2.x and 1.x. You should move to OpenAPI 3.1 to Allow requestBody creation for GET see #1814 |
@bnasslahsen I also tested it with 2.6.0. Same problem with OpenAPI 3.0. Do you plan to support only OpenAPI 3.1 with upcoming releases or is this maybe an oversight? |
Both are supported. |
You might be right. I'm not absolutely sure of it. The OpenApi 3.0.3 spec references RFC7231 here in the description of
So, while discouraged, I'd say it's technically allowed. What do you think? |
I am not refering to the RFC. |
This results in a definition where
myClass
parameter is defined to appear"in": "query"
. Correct behavior would be arequestBody
block with $ref schema.Neither
org.springframework.web.bind.annotation.RequestBody
norio.swagger.v3.oas.annotations.parameters.RequestBody
work.Actual
Expected part
It would be nice if a fix could be backported to the 1.8.x release 🙏.
The text was updated successfully, but these errors were encountered: