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
Have you provided a full/minimal spec to reproduce the issue?
Have you validated the input using an OpenAPI validator (example)?
What's the version of OpenAPI Generator used?
Have you search for related issues/PRs?
What's the actual output vs expected output?
Description
The Go client generator creates code that cannot be reached. In the error handler all response codes are iterated over. It's not possible to have 200 level responses in this block, but they are all listed out. You can see the example here to show the issue I'm referring to. It's impossible for the status code to be >= 300 and then == 201.
openapi-generator version
4.0.0
This doesn't appear to be a regression because the problem can be seen in the sample code.
Suggest a fix
I'm not sure what's possible here, since mustache templates are logic-less. The solution may be just to leave it the way it is.
The text was updated successfully, but these errors were encountered:
I could see that being helpful, since this is just to add an error handling case. I'm trying to work out if there's a way to structure the code differently to not need that.
Bug Report Checklist
Description
The Go client generator creates code that cannot be reached. In the error handler all response codes are iterated over. It's not possible to have 200 level responses in this block, but they are all listed out. You can see the example here to show the issue I'm referring to. It's impossible for the status code to be >= 300 and then == 201.
openapi-generator version
4.0.0
This doesn't appear to be a regression because the problem can be seen in the sample code.
Suggest a fix
I'm not sure what's possible here, since mustache templates are logic-less. The solution may be just to leave it the way it is.
The text was updated successfully, but these errors were encountered: