mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-07 19:08:52 +00:00
[swift] Open buildHeaders() and requestBuilderFactory property to allow extension. (#5225)
This commit is contained in:
parent
1277db61bd
commit
f110072ef1
@ -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 {
|
||||
|
@ -212,7 +212,7 @@ open class AlamofireRequestBuilder<T>: RequestBuilder<T> {
|
||||
}
|
||||
}
|
||||
|
||||
private func buildHeaders() -> [String: String] {
|
||||
open func buildHeaders() -> [String: String] {
|
||||
var httpHeaders = SessionManager.defaultHTTPHeaders
|
||||
for (key, value) in self.headers {
|
||||
httpHeaders[key] = value
|
||||
|
Loading…
Reference in New Issue
Block a user