Skip to content
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

[BUG] [swift5] 5.0.0-beta2 generates AnyType #7618

Closed
3 of 5 tasks
hyunoosung opened this issue Oct 7, 2020 · 3 comments
Closed
3 of 5 tasks

[BUG] [swift5] 5.0.0-beta2 generates AnyType #7618

hyunoosung opened this issue Oct 7, 2020 · 3 comments

Comments

@hyunoosung
Copy link

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • [] Have you validated the input using an OpenAPI validator (example)?
  • Have you tested with the latest master to confirm the issue still exists?
  • Have you searched for related issues/PRs?
  • What's the actual output vs expected output?
  • [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description

Our api doesn't provide enum types on query params.
Version 5.0.0-beta2 cast these enums as AnyType which is not usable in Swift project.

Same issue has reported and resolved for typescript-axos #6273

openapi-generator version

@openapitools/[email protected]

and master branch

OpenAPI declaration file content or url

https://api-int.icloudhospital.com/swagger/v1/swagger.json

Generation Details

With master branch

java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -g swift5 -i https://api-int.icloudhospital.com/swagger/v1/swagger.json -o src --skip-validate-spec

With 5.0.0-beta2

openapi-generator generate -g swift5 -i https://api-int.icloudhospital.com/swagger/v1/swagger.json -o src --skip-validate-spec

Steps to reproduce

Since our api doesn't provide enum type on it's query params, I had to add skip-validate-spec

Version 5.0.0-beta2 cast these enums as AnyType which is default for all generator and my Swift project can't find this type.

When I build the master branch and generated client, my project throws below error.

The compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions
image

Related issues/PRs

#6273

Suggest a fix
@wing328
Copy link
Member

wing328 commented Oct 11, 2020

Thanks for reporting the issue. I've filed #7644 to fix it.

@4brunu
Copy link
Contributor

4brunu commented Jun 8, 2021

I think this issue can now be closed

@teameh
Copy link

teameh commented Aug 30, 2024

@wing328 same here, this issue can be closed

@wing328 wing328 closed this as completed Aug 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants