-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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][Swift6] Numerous compilation issues with Swift 6 generator + Alamofire 5.10.x #20398
Comments
I looked into this for a bit. Alamofire 5.10 enforces that all objects used in the request conform to protocol JSONEncodable {
func encodeToJSON(codableHelper: CodableHelper) -> Any
} If this protocol gained the requirement that all conforming types also conform to Sendable, this can be fixed by returning extension Array: JSONEncodable where Element: Sendable Sendable is a marker protocol and JSONEncodable is not. So all types that may be used in a request should conform to JSONEncodable instead. |
Hi, this is a know issue. openapi-generator/modules/openapi-generator/src/main/resources/swift6/Package.swift.mustache Lines 28 to 29 in 3d65786
Unfortunately, currently I don't have time to fix this issue, but if anyone can create a PR, I can help with the review and merge. Thanks. |
@4brunu A question about the current client: Could the |
That's a good question. |
Bug Report Checklist
Description
Updating to Alamofire 5.10.x causes multiple compilation issues around Sendable.
In particular, the following classes have issues:
openapi-generator version
7.10.0
Generation Details
This is one of the Infrastructure files generated along with any scheme.
Steps to reproduce
use the Swift 6 generator with the latest alamofire 5.10.x and observe that it does not compile due to a bunch of swift 6 errors
The text was updated successfully, but these errors were encountered: