Skip to content

Commit

Permalink
fix(swift5): fix compile error from Alamofire 5.10
Browse files Browse the repository at this point in the history
  • Loading branch information
ThibaultBee authored Oct 21, 2024
1 parent f9b74cd commit ecb10e7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .openapi-generator/oas_apivideo.yaml-defaut-cli.sha256
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9d05425d4fb2c3a73804ed5a27232eda6751260b0947f6b4c736cc96df300103
6f374764cf476ad001123c84953d1980aaf6bc352573020d111594ab74058bf6
4 changes: 3 additions & 1 deletion Sources/AlamofireImplementations.swift
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,8 @@ extension JSONDataEncoding: ParameterEncoding {
public func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest {
let urlRequest = try urlRequest.asURLRequest()

return encode(urlRequest, with: parameters)
// Alamofire 5.10 changed type of Parameters so that it is no longer equivalent to [String: Any]
// cast this type so that the call to encode is not recursive
return encode(urlRequest, with: parameters as [String: Any]?)
}
}

0 comments on commit ecb10e7

Please sign in to comment.