From f110072ef1a238145823f409fa7cb28c46c49b32 Mon Sep 17 00:00:00 2001 From: Tomek Cejner Date: Sun, 23 Apr 2017 17:02:21 +0200 Subject: [PATCH] [swift] Open buildHeaders() and requestBuilderFactory property to allow extension. (#5225) --- modules/swagger-codegen/src/main/resources/swift3/APIs.mustache | 2 +- .../src/main/resources/swift3/AlamofireImplementations.mustache | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/swagger-codegen/src/main/resources/swift3/APIs.mustache b/modules/swagger-codegen/src/main/resources/swift3/APIs.mustache index 1ce9e02e4dd..65294aafe56 100644 --- a/modules/swagger-codegen/src/main/resources/swift3/APIs.mustache +++ b/modules/swagger-codegen/src/main/resources/swift3/APIs.mustache @@ -10,7 +10,7 @@ open class {{projectName}}API { open static var basePath = "{{{basePath}}}" open static var credential: URLCredential? open static var customHeaders: [String:String] = [:] - static var requestBuilderFactory: RequestBuilderFactory = AlamofireRequestBuilderFactory() + open static var requestBuilderFactory: RequestBuilderFactory = AlamofireRequestBuilderFactory() } open class APIBase { diff --git a/modules/swagger-codegen/src/main/resources/swift3/AlamofireImplementations.mustache b/modules/swagger-codegen/src/main/resources/swift3/AlamofireImplementations.mustache index 31dc40e1b29..8ef9da6b3b1 100644 --- a/modules/swagger-codegen/src/main/resources/swift3/AlamofireImplementations.mustache +++ b/modules/swagger-codegen/src/main/resources/swift3/AlamofireImplementations.mustache @@ -212,7 +212,7 @@ open class AlamofireRequestBuilder: RequestBuilder { } } - private func buildHeaders() -> [String: String] { + open func buildHeaders() -> [String: String] { var httpHeaders = SessionManager.defaultHTTPHeaders for (key, value) in self.headers { httpHeaders[key] = value