Description
jaxrs-cxf-server:
Currently there is a variable returnType, but it contains "void" for Java methods with no result.
We need a flag to check in the mustache templates if a method is "void" (true/false) to generate the apiServiceImpl and the unit tests accordingly.
apiServiceImpl.mustache:
{{#returnType}}return null;{{/returnType}}
This line should only be generated for non-void methods, but currently its not possible to check for void.
api_test.mustache:
Currently all methods are handled like they return a response:
// {{#returnType}}{{{returnType}}} response =...
Unittests (all Java languages)
The handling of void return types should be changed in all Java unit test templates.
Swagger-codegen version
master
Related issues
extracted from PR #4003
Description
jaxrs-cxf-server:
Currently there is a variable returnType, but it contains "void" for Java methods with no result.
We need a flag to check in the mustache templates if a method is "void" (true/false) to generate the apiServiceImpl and the unit tests accordingly.
apiServiceImpl.mustache:
{{#returnType}}return null;{{/returnType}}This line should only be generated for non-void methods, but currently its not possible to check for void.
api_test.mustache:
Currently all methods are handled like they return a response:
// {{#returnType}}{{{returnType}}} response =...Unittests (all Java languages)
The handling of void return types should be changed in all Java unit test templates.
Swagger-codegen version
master
Related issues
extracted from PR #4003