Open staizen-rcomblen opened 1 year ago
Using Java Spring the return void is not primitive and this forces you to implement a return null. There is issue #12341 for using primitive void and not having return.
generateControllerAsAbstract
property doesn't support anymore, now always create interface
Just use official micronaut generator for java and kotlin by micronaut-opeanpi gradle or maven plugin from this repo: https://github.com/micronaut-projects/micronaut-openapi
Look to this guide: https://guides.micronaut.io/latest/micronaut-openapi-generator-server.html
Also, please describe problems and suggestions here: https://github.com/micronaut-projects/micronaut-openapi/issues
Bug Report Checklist
Description
java-micronaut-server
withreactive=false
andgenerateControllerAsAbstract=true
leads to invalid Java code for void operations.Generated code is:
Expected output is:
you cannot return something from a void method. Java compiler complains.
openapi-generator version
6.2.1
OpenAPI declaration file content or url
Generation Details
Steps to reproduce
Related issues/PRs
/
Suggest a fix
Mustache template should specifically handle this void methods case.