Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upSwagger: Undocumented API response in swagger.json for BomResource #341
Labels
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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-clientThe BomApi class will contain methods with void parameters.
Expected Behavior:
Responses in swagger.json should also have documented 200 responses
Environment:
Proposed Solution: