Open reubits opened 2 years ago
I can confirm this issue. My fix was to downgrade to openapi-generator version 5.3.1 (last stable version). Seems like the issue was introduced with this change: https://github.com/OpenAPITools/openapi-generator/pull/11202/files#diff-107652f98524df152f1ec2dba250090381397e99b5e243b603a509e84dcfa882
Bug Report Checklist
Description
With the
swift5
generator version5.4.0
,JSONEncodable
s default toData.JSONEncodable
which uses base64EncodedString. It seems like this should not be intentional given that we also have these extensions which apparently are not being used as a result.The API we are using does not expect base64-encoded params and this is leading to bad request errors (400). This problem was introduced in 5.4.0 after upgrading from 5.3.0.
openapi-generator version
5.4.0. This appears to be a regression.
Steps to reproduce
Generate against a spec with an integer query parameter and observe that it gets base64-encoded.
e.g. expected:
limit=100
, got:limit=MTAw
Related issues/PRs
I believe this PR introduced the issue:
https://github.com/RitualCo/ios/pull/2725
Suggest a fix
It can be patched by doing