Open hnitzsche opened 2 years ago
Workaround: annotate the method parameter in implementation
@Overrride
public ResponseEntity<List<Book>> getAllBooks(@ParameterObject GetAllBooksBookFilterParameter bookFilter, @ParameterObject Pageable pageable) {
Bug Report Checklist
Description
If I generate spring code with springoc annotation provider from an OpenAPI spec where an operation is defined that contains an object as query parameter I expect this object being annotated with @ParameterObject or have a possibility to do so.
openapi-generator version
OpenAPI declaration file content or url
Generation Details
java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate \ -i above_file.yaml \ -g spring \ -o /generated-output
Steps to reproduce
Output is:
Related issues/PRs
Suggest a fix
I suggest annotating the request parameter object with ParameterObject instead of Parameter like this:
Would appreciate if someone could make a suggestion to make this possible or comment with any concerns about this.