Skip to content

Commit 8283624

Browse files
committed
update samples
1 parent b6d5f12 commit 8283624

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

+3-1
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)