-
-
Notifications
You must be signed in to change notification settings - Fork 528
Add support for @ParameterObject with POST endpoints #693
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
@ParameterObject is designed for HTTP GET Methods. |
@bnasslahsen is there any way to map an object holding query params to query params in swagger for POST? this behaviour is supported by spring and controller itself works fine, but apparently not supported by springdoc-openapi |
We will add the support for @ParameterObject with POST endpoints for the next release. |
Question?, just for post-method? because for put or patch methods are also possible.. Regards |
Yes, for other methods you mentionned as well. |
How about POST with application/x-www-form-urlencoded conent type? |
springdoc-openapi-ui version: 1.3.9
In my spring web endpoint I have an object which summarise query params
To make it work properly, I see
@ParameterObject
was introduced in #505It works for GET requests (
@GetMapping
) -> all properties of object are parsed as separate query parametersUI:

json:
However I don't see this behaviour with POST requests
And object holding query params is parsed as BODY object
Example of my code
UI:

json:
Expected behavior
Objects in POST endpoints annotated with
@ParameterObject
should behave the same way as for GET and all fields of this object are parsed as query paramsThe text was updated successfully, but these errors were encountered: