diff --git a/modules/openapi-generator/src/main/resources/swift6/APIs.mustache b/modules/openapi-generator/src/main/resources/swift6/APIs.mustache index 55ed0a08b51..c0080c12ba2 100644 --- a/modules/openapi-generator/src/main/resources/swift6/APIs.mustache +++ b/modules/openapi-generator/src/main/resources/swift6/APIs.mustache @@ -104,6 +104,7 @@ import Alamofire{{/useAlamofire}} self.openAPIClient = openAPIClient addHeaders(openAPIClient.customHeaders) + addCredential() } {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} func addHeaders(_ aHeaders: [String: String]) { @@ -161,9 +162,8 @@ import Alamofire{{/useAlamofire}} return self } - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} func addCredential() -> Self { + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} func addCredential() { credential = openAPIClient.credential - return self } } diff --git a/samples/client/petstore/swift6/alamofireLibrary/Sources/PetstoreClient/Infrastructure/APIs.swift b/samples/client/petstore/swift6/alamofireLibrary/Sources/PetstoreClient/Infrastructure/APIs.swift index cc25ab3ee26..a5313388c63 100644 --- a/samples/client/petstore/swift6/alamofireLibrary/Sources/PetstoreClient/Infrastructure/APIs.swift +++ b/samples/client/petstore/swift6/alamofireLibrary/Sources/PetstoreClient/Infrastructure/APIs.swift @@ -83,6 +83,7 @@ open class RequestBuilder: @unchecked Sendable { self.openAPIClient = openAPIClient addHeaders(openAPIClient.customHeaders) + addCredential() } open func addHeaders(_ aHeaders: [String: String]) { @@ -103,9 +104,8 @@ open class RequestBuilder: @unchecked Sendable { return self } - open func addCredential() -> Self { + open func addCredential() { credential = openAPIClient.credential - return self } } diff --git a/samples/client/petstore/swift6/apiNonStaticMethod/Sources/PetstoreClient/Infrastructure/APIs.swift b/samples/client/petstore/swift6/apiNonStaticMethod/Sources/PetstoreClient/Infrastructure/APIs.swift index 52ff5ed4ba1..2beb10b49b3 100644 --- a/samples/client/petstore/swift6/apiNonStaticMethod/Sources/PetstoreClient/Infrastructure/APIs.swift +++ b/samples/client/petstore/swift6/apiNonStaticMethod/Sources/PetstoreClient/Infrastructure/APIs.swift @@ -83,6 +83,7 @@ open class RequestBuilder: @unchecked Sendable { self.openAPIClient = openAPIClient addHeaders(openAPIClient.customHeaders) + addCredential() } open func addHeaders(_ aHeaders: [String: String]) { @@ -138,9 +139,8 @@ open class RequestBuilder: @unchecked Sendable { return self } - open func addCredential() -> Self { + open func addCredential() { credential = openAPIClient.credential - return self } } diff --git a/samples/client/petstore/swift6/asyncAwaitLibrary/Sources/PetstoreClient/Infrastructure/APIs.swift b/samples/client/petstore/swift6/asyncAwaitLibrary/Sources/PetstoreClient/Infrastructure/APIs.swift index d4ad3ddd865..780dd6dd1a5 100644 --- a/samples/client/petstore/swift6/asyncAwaitLibrary/Sources/PetstoreClient/Infrastructure/APIs.swift +++ b/samples/client/petstore/swift6/asyncAwaitLibrary/Sources/PetstoreClient/Infrastructure/APIs.swift @@ -69,6 +69,7 @@ open class RequestBuilder: @unchecked Sendable { self.openAPIClient = openAPIClient addHeaders(openAPIClient.customHeaders) + addCredential() } open func addHeaders(_ aHeaders: [String: String]) { @@ -124,9 +125,8 @@ open class RequestBuilder: @unchecked Sendable { return self } - open func addCredential() -> Self { + open func addCredential() { credential = openAPIClient.credential - return self } } diff --git a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/APIs.swift b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/APIs.swift index 53681863380..c3acec934bb 100644 --- a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/APIs.swift +++ b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/APIs.swift @@ -69,6 +69,7 @@ open class RequestBuilder: @unchecked Sendable { self.openAPIClient = openAPIClient addHeaders(openAPIClient.customHeaders) + addCredential() } open func addHeaders(_ aHeaders: [String: String]) { @@ -89,9 +90,8 @@ open class RequestBuilder: @unchecked Sendable { return self } - open func addCredential() -> Self { + open func addCredential() { credential = openAPIClient.credential - return self } } diff --git a/samples/client/petstore/swift6/combineLibrary/Sources/CombineLibrary/Infrastructure/APIs.swift b/samples/client/petstore/swift6/combineLibrary/Sources/CombineLibrary/Infrastructure/APIs.swift index 53681863380..c3acec934bb 100644 --- a/samples/client/petstore/swift6/combineLibrary/Sources/CombineLibrary/Infrastructure/APIs.swift +++ b/samples/client/petstore/swift6/combineLibrary/Sources/CombineLibrary/Infrastructure/APIs.swift @@ -69,6 +69,7 @@ open class RequestBuilder: @unchecked Sendable { self.openAPIClient = openAPIClient addHeaders(openAPIClient.customHeaders) + addCredential() } open func addHeaders(_ aHeaders: [String: String]) { @@ -89,9 +90,8 @@ open class RequestBuilder: @unchecked Sendable { return self } - open func addCredential() -> Self { + open func addCredential() { credential = openAPIClient.credential - return self } } diff --git a/samples/client/petstore/swift6/default/Sources/PetstoreClient/Infrastructure/APIs.swift b/samples/client/petstore/swift6/default/Sources/PetstoreClient/Infrastructure/APIs.swift index d4ad3ddd865..780dd6dd1a5 100644 --- a/samples/client/petstore/swift6/default/Sources/PetstoreClient/Infrastructure/APIs.swift +++ b/samples/client/petstore/swift6/default/Sources/PetstoreClient/Infrastructure/APIs.swift @@ -69,6 +69,7 @@ open class RequestBuilder: @unchecked Sendable { self.openAPIClient = openAPIClient addHeaders(openAPIClient.customHeaders) + addCredential() } open func addHeaders(_ aHeaders: [String: String]) { @@ -124,9 +125,8 @@ open class RequestBuilder: @unchecked Sendable { return self } - open func addCredential() -> Self { + open func addCredential() { credential = openAPIClient.credential - return self } } diff --git a/samples/client/petstore/swift6/objcCompatible/Sources/PetstoreClient/Infrastructure/APIs.swift b/samples/client/petstore/swift6/objcCompatible/Sources/PetstoreClient/Infrastructure/APIs.swift index 53681863380..c3acec934bb 100644 --- a/samples/client/petstore/swift6/objcCompatible/Sources/PetstoreClient/Infrastructure/APIs.swift +++ b/samples/client/petstore/swift6/objcCompatible/Sources/PetstoreClient/Infrastructure/APIs.swift @@ -69,6 +69,7 @@ open class RequestBuilder: @unchecked Sendable { self.openAPIClient = openAPIClient addHeaders(openAPIClient.customHeaders) + addCredential() } open func addHeaders(_ aHeaders: [String: String]) { @@ -89,9 +90,8 @@ open class RequestBuilder: @unchecked Sendable { return self } - open func addCredential() -> Self { + open func addCredential() { credential = openAPIClient.credential - return self } } diff --git a/samples/client/petstore/swift6/oneOf/PetstoreClient/Classes/OpenAPIs/Infrastructure/APIs.swift b/samples/client/petstore/swift6/oneOf/PetstoreClient/Classes/OpenAPIs/Infrastructure/APIs.swift index f16a75b3232..4cdb41e1204 100644 --- a/samples/client/petstore/swift6/oneOf/PetstoreClient/Classes/OpenAPIs/Infrastructure/APIs.swift +++ b/samples/client/petstore/swift6/oneOf/PetstoreClient/Classes/OpenAPIs/Infrastructure/APIs.swift @@ -69,6 +69,7 @@ open class RequestBuilder: @unchecked Sendable { self.openAPIClient = openAPIClient addHeaders(openAPIClient.customHeaders) + addCredential() } open func addHeaders(_ aHeaders: [String: String]) { @@ -89,9 +90,8 @@ open class RequestBuilder: @unchecked Sendable { return self } - open func addCredential() -> Self { + open func addCredential() { credential = openAPIClient.credential - return self } } diff --git a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/APIs.swift b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/APIs.swift index 53681863380..c3acec934bb 100644 --- a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/APIs.swift +++ b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/APIs.swift @@ -69,6 +69,7 @@ open class RequestBuilder: @unchecked Sendable { self.openAPIClient = openAPIClient addHeaders(openAPIClient.customHeaders) + addCredential() } open func addHeaders(_ aHeaders: [String: String]) { @@ -89,9 +90,8 @@ open class RequestBuilder: @unchecked Sendable { return self } - open func addCredential() -> Self { + open func addCredential() { credential = openAPIClient.credential - return self } } diff --git a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/APIs.swift b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/APIs.swift index 48912d8a359..7d8c0e7aaea 100644 --- a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/APIs.swift +++ b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/APIs.swift @@ -69,6 +69,7 @@ internal class RequestBuilder: @unchecked Sendable { self.openAPIClient = openAPIClient addHeaders(openAPIClient.customHeaders) + addCredential() } internal func addHeaders(_ aHeaders: [String: String]) { @@ -89,9 +90,8 @@ internal class RequestBuilder: @unchecked Sendable { return self } - internal func addCredential() -> Self { + internal func addCredential() { credential = openAPIClient.credential - return self } } diff --git a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/APIs.swift b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/APIs.swift index 53681863380..c3acec934bb 100644 --- a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/APIs.swift +++ b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/APIs.swift @@ -69,6 +69,7 @@ open class RequestBuilder: @unchecked Sendable { self.openAPIClient = openAPIClient addHeaders(openAPIClient.customHeaders) + addCredential() } open func addHeaders(_ aHeaders: [String: String]) { @@ -89,9 +90,8 @@ open class RequestBuilder: @unchecked Sendable { return self } - open func addCredential() -> Self { + open func addCredential() { credential = openAPIClient.credential - return self } } diff --git a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Infrastructure/APIs.swift b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Infrastructure/APIs.swift index 65224277042..86016f1efe9 100644 --- a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Infrastructure/APIs.swift +++ b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Infrastructure/APIs.swift @@ -71,6 +71,7 @@ open class RequestBuilder: @unchecked Sendable { self.openAPIClient = openAPIClient addHeaders(openAPIClient.customHeaders) + addCredential() } open func addHeaders(_ aHeaders: [String: String]) { @@ -91,9 +92,8 @@ open class RequestBuilder: @unchecked Sendable { return self } - open func addCredential() -> Self { + open func addCredential() { credential = openAPIClient.credential - return self } } diff --git a/samples/client/petstore/swift6/validation/PetstoreClient/Classes/OpenAPIs/Infrastructure/APIs.swift b/samples/client/petstore/swift6/validation/PetstoreClient/Classes/OpenAPIs/Infrastructure/APIs.swift index 362d9ce5333..78354f00789 100644 --- a/samples/client/petstore/swift6/validation/PetstoreClient/Classes/OpenAPIs/Infrastructure/APIs.swift +++ b/samples/client/petstore/swift6/validation/PetstoreClient/Classes/OpenAPIs/Infrastructure/APIs.swift @@ -69,6 +69,7 @@ open class RequestBuilder: @unchecked Sendable { self.openAPIClient = openAPIClient addHeaders(openAPIClient.customHeaders) + addCredential() } open func addHeaders(_ aHeaders: [String: String]) { @@ -124,9 +125,8 @@ open class RequestBuilder: @unchecked Sendable { return self } - open func addCredential() -> Self { + open func addCredential() { credential = openAPIClient.credential - return self } }