You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because of an issue, a pr was proposed, but this led to a bigger problem. All annotations that use RequestBody, RequestPart and custom message body processing are rendered invalid on swagger-ui. Objects become flattened objects and eventually query parameters, which cannot be processed into json or other required message body formats.
To Reproduce
Steps to reproduce the behavior:
What version of spring-boot you are using?
Spring Boot 3.1.1
What modules and versions of springdoc-openapi are you using?
springdoc-openapi 2.1.0
What is the actual and the expected result using OpenAPI Description (yml or json)?
When I use default-flat-param-object, I want swagger-ui to behave in line with how spring web handles
Provide with a sample code (HelloController) or Test that reproduces the problem
springdoc:
default-flat-param-object: true
Expected behavior
I want springdoc to automatically flatten my complex query param objects when I use default-flat-param-object, but it shouldn't do anything for the json objects I need to accept as well as form objects. But now it turns my json object into a query parameter, and my swagger-ui is not working properly.
In fact, the emergence of default-flat-param-object is to solve the problem of repeatedly adding ParameterObject. But more importantly, the core problem is that it is close to springweb's default behavior. The simple way is of course to only process RequestBody and RequestPart, but I know that many developers will customize annotations to process requests. In order to be compatible with this part of developers, when using annotations for parameters, ignore default-flat-param-object
Describe the bug
Because of an issue, a pr was proposed, but this led to a bigger problem. All annotations that use RequestBody, RequestPart and custom message body processing are rendered invalid on swagger-ui. Objects become flattened objects and eventually query parameters, which cannot be processed into json or other required message body formats.
To Reproduce
Steps to reproduce the behavior:
Spring Boot 3.1.1
springdoc-openapi 2.1.0
When I use default-flat-param-object, I want swagger-ui to behave in line with how spring web handles
Expected behavior
I want springdoc to automatically flatten my complex query param objects when I use default-flat-param-object, but it shouldn't do anything for the json objects I need to accept as well as form objects. But now it turns my json object into a query parameter, and my swagger-ui is not working properly.
In fact, the emergence of default-flat-param-object is to solve the problem of repeatedly adding ParameterObject. But more importantly, the core problem is that it is close to springweb's default behavior. The simple way is of course to only process RequestBody and RequestPart, but I know that many developers will customize annotations to process requests. In order to be compatible with this part of developers, when using annotations for parameters, ignore default-flat-param-object
Screenshots
command
is a json object but converted to multiple query param.The text was updated successfully, but these errors were encountered: