Describe the enhancement
When using @ModelAttribute in a Spring MVC controller, it currently requires additional usage of @ParameterObject from springdoc-openapi to generate accurate documentation. An enhancement is requested to provide direct support for @ModelAttribute without the need for additional @ParameterObject annotation, reducing annotation complexity.
To Reproduce
Steps to reproduce the current behavior:
- Spring Boot version: 3.2.0
- springdoc-openapi version: 2.2.0
@RestController
public class TestController {
@GetMapping("/springdoc/test")
public void test(@ParameterObject @ModelAttribute TestRequest request){
}
@Data
static class TestRequest {
/**
* aa
*/
private String a;
}
}
Expected behavior
Direct support for @ModelAttribute in the Spring MVC controller without the need for additional @ParameterObject annotation.
Additional context
Add any other context about the feature enhancement here.