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
When generating a client for operations with typed default responses, after all the different cases for status codes, an extra else branch is added to handle the default response, but after this, an extra line (line 135 in my example) is added with a return, which causes build errors because it's dead code (all branches of the status if either throw or return).
I didn't try to understand all possible cases in the corresponding template, but I see that if I remove the default response from the YAML, then there's no conditionless branch in the if-else, so this last return statement makes sense, but in other cases, it's problematic.
The text was updated successfully, but these errors were encountered:
Using version 11.17.21 from NuGet.
Example yaml and generated code in a gist here.
When generating a client for operations with typed default responses, after all the different cases for status codes, an extra
else
branch is added to handle the default response, but after this, an extra line (line 135 in my example) is added with a return, which causes build errors because it's dead code (all branches of the statusif
either throw or return).I didn't try to understand all possible cases in the corresponding template, but I see that if I remove the default response from the YAML, then there's no conditionless branch in the if-else, so this last return statement makes sense, but in other cases, it's problematic.
The text was updated successfully, but these errors were encountered: