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
Emit the same if statements we're already doing but put all the pattern matched ones at the end for if we haven't matched anything directly. Then order the patterns e.g. if statusCode >= 400 && statusCode < 410 .... if statusCode >= 410...
Perhaps it's just my particular use case but I don't see any of the generated statusCode > 300 if statements doing anything particularly unique, perhaps just having all of the errors do the same thing would be sufficient here, but my understanding of the generator tools and OpenAPI spec creation is limited.
The text was updated successfully, but these errors were encountered:
Bug Report Checklist
Description
When using patterned fields https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#patterned-fields-1 for HTTP Status Codes such as 4XX we get a compile time error because the codegen spits out lines like
localVarHTTPResponse.StatusCode == 4XX
. This requires manually editing the codegen file in order to get things to compile.openapi-generator version
5.0.0-beta2, although this is the case in 5.0.0-beta and 4.3.1 as well
OpenAPI declaration file content or url
https://github.com/ipfs/pinning-services-api-spec/blob/46f23fdea009244a49c12b586c06ef30c2ca982f/ipfs-pinning-service.yaml
(or alternatively, https://raw.githubusercontent.com/ipfs/pinning-services-api-spec/46f23fdea009244a49c12b586c06ef30c2ca982f/ipfs-pinning-service.yaml)
Generation Details
Steps to reproduce
Related issues/PRs
Suggest a fix
if statusCode >= 400 && statusCode < 410 .... if statusCode >= 410...
The text was updated successfully, but these errors were encountered: