New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API does not have a return value. but API spec has #1490
Comments
Can someone please comment on this? This is important. Let me know if I have missed something in my API spec. |
As an additional verification, I tested the same API spec and generated the python code, and this API returns the values. However, Java code does not.
|
We ran into the same problem: when some HTTP method in OAS has no The template for this method in Notably, the Therefore, it seems to be a bug in UPDATE: there is a config option One option we may consider is to use custom status annotation with filter on |
Generated API does not return the HTTP response code.
As shown below, the API specification has responses 200 and 400; however, when the addTeam() API is generated, it is generated with the return type 'void'.
I want to handle the response code 200 and/or 400. Does it mean I have explicitly, define the payload type in the response specification? Can someone please provide more details on how my 'responses' specification should be?
openapi generator 3.2.0
Swagger declaration file content or url
Command line used for generation
java -jar openapi-generator-cli-3.2.0.jar generate -i teamApiSpec.yaml -g java
Generated Java code:
The text was updated successfully, but these errors were encountered: