My environment
springboot:2.6.4
springdoc-openapi-ui:1.6.6
Probrem
I want to create an API definition to receive requests in x-www-form-urlencoded format. Using @RequestBody will create a swagger-ui display with no Parameter notation, just the body. However, when receiving a request in x-www-form-urlencoded format, it is necessary to receive it with @RequestParam, and if this is done, the swagger-ui display is created as a query parameter.
@PostMapping(value = "/v1/hoge")
public ResponseEntity<SampleResponse> postProc(
@RequestParam("param1") int param1,
@RequestParam("param2") String param2,
@RequestParam("param3") String param3,
HttpServletRequest request) {
・・・
}
However, since there is no actual query parameter, I do not want to display the Parameter in the same way as when receiving a request with @RequestBody. The display without parameters is correct, as in POST /user in the following link.
http://158.101.191.70:8081/swagger-ui/4.5.0/index.html#/user/createUser
Is there a solution to this problem?