Skip to content

Commit 88082a5

Browse files
update samples
1 parent 4513171 commit 88082a5

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,8 @@ extension JSONDataEncoding: ParameterEncoding {
408408
public func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest {
409409
let urlRequest = try urlRequest.asURLRequest()
410410

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

0 commit comments

Comments
 (0)