Bug Report Checklist
Description
This project showcases a weird error where callback closure is not called.
- This happens with the default library selected (URLSession). With Alamofire, everything is fine.
- In the 5.0.0 stable version, the error is not happening
- Snapshot Commit: 90ed129 from 2020-01-22
- Tested with Xcode 12.3 (12C33) on macOS Catalina 10.15.7 (19H15)
- Try switching the generator from snapshot to stable pod in
Podfile to see the change.
openapi-generator version
5.0.1-snapshot (commit 90ed129)
OpenAPI declaration file content or url
See test-project: https://github.com/fl034/Test-OAS
Generation Details
Steps to reproduce
Run sample project
Related issues/PRs
Nothing found
Suggest a fix
- The issue seems to be in
URLSessionImplementations.swift in line 137. self seems to be deallocated immediately, because it’s weak.
- When I remove
[weak self] it works again. But this isn’t the root of the problem, since the stable version also has [weak self]
Bug Report Checklist
Description
This project showcases a weird error where callback closure is not called.
Podfileto see the change.openapi-generator version
5.0.1-snapshot (commit 90ed129)
OpenAPI declaration file content or url
See test-project: https://github.com/fl034/Test-OAS
Generation Details
Steps to reproduce
Run sample project
Related issues/PRs
Nothing found
Suggest a fix
URLSessionImplementations.swiftin line 137.selfseems to be deallocated immediately, because it’s weak.[weak self]it works again. But this isn’t the root of the problem, since the stable version also has[weak self]