You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The swagger.json does not contain documented responses for some apis and hence when using swagger-codegen to generate the api clients the resultant api code ends up with void return results.
Current Behavior:
The swagger.json does not contain documented responses for some apis and hence when using swagger-codegen to generate the api clients the resultant api code ends up with void return results.
This is because the @ApiOperation response is not being set to an appropriate VO hence according to http://docs.swagger.io/swagger-core/apidocs/com/wordnik/swagger/annotations/ApiOperation.html#response() the return type will be void.
Steps to Reproduce:
java -jar swagger-codegen-cli-3.0.8.jar generate -i swagger.json --api-package org.dependencytrack.client.jersey2.api --model-package org.dependencytrack.client.jersey2.model --invoker-package org.dependencytrack.client.jersey2.invoker --group-id org.dependencytrack --artifact-id jersey-swagger-codegen-api-client --artifact-version 0.0.1-SNAPSHOT -l java --library jersey2 -o jersey-swagger-codegen-api-client
The BomApi class will contain methods with void parameters.
Expected Behavior:
Responses in swagger.json should also have documented 200 responses
Environment:
Proposed Solution:
The text was updated successfully, but these errors were encountered: