diff --git a/modules/openapi-generator/src/main/resources/swift6/SynchronizedDictionary.mustache b/modules/openapi-generator/src/main/resources/swift6/SynchronizedDictionary.mustache index 24a1f3224a19..0d2714ca7b02 100644 --- a/modules/openapi-generator/src/main/resources/swift6/SynchronizedDictionary.mustache +++ b/modules/openapi-generator/src/main/resources/swift6/SynchronizedDictionary.mustache @@ -6,7 +6,7 @@ import Foundation -internal struct SynchronizedDictionary : @unchecked Sendable { +internal class SynchronizedDictionary : @unchecked Sendable { private var dictionary = [K: V]() private let lock = NSRecursiveLock() diff --git a/modules/openapi-generator/src/main/resources/swift6/libraries/alamofire/AlamofireImplementations.mustache b/modules/openapi-generator/src/main/resources/swift6/libraries/alamofire/AlamofireImplementations.mustache index a92eb8c13add..a5c62c80203d 100644 --- a/modules/openapi-generator/src/main/resources/swift6/libraries/alamofire/AlamofireImplementations.mustache +++ b/modules/openapi-generator/src/main/resources/swift6/libraries/alamofire/AlamofireImplementations.mustache @@ -24,7 +24,7 @@ fileprivate class AlamofireRequestBuilderConfiguration: @unchecked Sendable { static let shared = AlamofireRequestBuilderConfiguration() // Store manager to retain its reference - var managerStore = SynchronizedDictionary() + let managerStore = SynchronizedDictionary() } {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class AlamofireRequestBuilder: RequestBuilder, @unchecked Sendable { diff --git a/modules/openapi-generator/src/main/resources/swift6/libraries/urlsession/URLSessionImplementations.mustache b/modules/openapi-generator/src/main/resources/swift6/libraries/urlsession/URLSessionImplementations.mustache index 59b4aecbedd2..6ff9328dd7c8 100644 --- a/modules/openapi-generator/src/main/resources/swift6/libraries/urlsession/URLSessionImplementations.mustache +++ b/modules/openapi-generator/src/main/resources/swift6/libraries/urlsession/URLSessionImplementations.mustache @@ -66,7 +66,7 @@ fileprivate class URLSessionRequestBuilderConfiguration: @unchecked Sendable { let defaultURLSession: URLSession // Store current URLCredential for every URLSessionTask - var credentialStore = SynchronizedDictionary() + let credentialStore = SynchronizedDictionary() } {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class URLSessionRequestBuilder: RequestBuilder, @unchecked Sendable { diff --git a/samples/client/petstore/swift6/alamofireLibrary/Sources/PetstoreClient/Infrastructure/AlamofireImplementations.swift b/samples/client/petstore/swift6/alamofireLibrary/Sources/PetstoreClient/Infrastructure/AlamofireImplementations.swift index 1efeb37227d1..331acf68cb07 100644 --- a/samples/client/petstore/swift6/alamofireLibrary/Sources/PetstoreClient/Infrastructure/AlamofireImplementations.swift +++ b/samples/client/petstore/swift6/alamofireLibrary/Sources/PetstoreClient/Infrastructure/AlamofireImplementations.swift @@ -24,7 +24,7 @@ fileprivate class AlamofireRequestBuilderConfiguration: @unchecked Sendable { static let shared = AlamofireRequestBuilderConfiguration() // Store manager to retain its reference - var managerStore = SynchronizedDictionary() + let managerStore = SynchronizedDictionary() } open class AlamofireRequestBuilder: RequestBuilder, @unchecked Sendable { diff --git a/samples/client/petstore/swift6/alamofireLibrary/Sources/PetstoreClient/Infrastructure/SynchronizedDictionary.swift b/samples/client/petstore/swift6/alamofireLibrary/Sources/PetstoreClient/Infrastructure/SynchronizedDictionary.swift index 24a1f3224a19..0d2714ca7b02 100644 --- a/samples/client/petstore/swift6/alamofireLibrary/Sources/PetstoreClient/Infrastructure/SynchronizedDictionary.swift +++ b/samples/client/petstore/swift6/alamofireLibrary/Sources/PetstoreClient/Infrastructure/SynchronizedDictionary.swift @@ -6,7 +6,7 @@ import Foundation -internal struct SynchronizedDictionary : @unchecked Sendable { +internal class SynchronizedDictionary : @unchecked Sendable { private var dictionary = [K: V]() private let lock = NSRecursiveLock() diff --git a/samples/client/petstore/swift6/apiNonStaticMethod/Sources/PetstoreClient/Infrastructure/AlamofireImplementations.swift b/samples/client/petstore/swift6/apiNonStaticMethod/Sources/PetstoreClient/Infrastructure/AlamofireImplementations.swift index 1efeb37227d1..331acf68cb07 100644 --- a/samples/client/petstore/swift6/apiNonStaticMethod/Sources/PetstoreClient/Infrastructure/AlamofireImplementations.swift +++ b/samples/client/petstore/swift6/apiNonStaticMethod/Sources/PetstoreClient/Infrastructure/AlamofireImplementations.swift @@ -24,7 +24,7 @@ fileprivate class AlamofireRequestBuilderConfiguration: @unchecked Sendable { static let shared = AlamofireRequestBuilderConfiguration() // Store manager to retain its reference - var managerStore = SynchronizedDictionary() + let managerStore = SynchronizedDictionary() } open class AlamofireRequestBuilder: RequestBuilder, @unchecked Sendable { diff --git a/samples/client/petstore/swift6/apiNonStaticMethod/Sources/PetstoreClient/Infrastructure/SynchronizedDictionary.swift b/samples/client/petstore/swift6/apiNonStaticMethod/Sources/PetstoreClient/Infrastructure/SynchronizedDictionary.swift index 24a1f3224a19..0d2714ca7b02 100644 --- a/samples/client/petstore/swift6/apiNonStaticMethod/Sources/PetstoreClient/Infrastructure/SynchronizedDictionary.swift +++ b/samples/client/petstore/swift6/apiNonStaticMethod/Sources/PetstoreClient/Infrastructure/SynchronizedDictionary.swift @@ -6,7 +6,7 @@ import Foundation -internal struct SynchronizedDictionary : @unchecked Sendable { +internal class SynchronizedDictionary : @unchecked Sendable { private var dictionary = [K: V]() private let lock = NSRecursiveLock() diff --git a/samples/client/petstore/swift6/asyncAwaitLibrary/Sources/PetstoreClient/Infrastructure/SynchronizedDictionary.swift b/samples/client/petstore/swift6/asyncAwaitLibrary/Sources/PetstoreClient/Infrastructure/SynchronizedDictionary.swift index 24a1f3224a19..0d2714ca7b02 100644 --- a/samples/client/petstore/swift6/asyncAwaitLibrary/Sources/PetstoreClient/Infrastructure/SynchronizedDictionary.swift +++ b/samples/client/petstore/swift6/asyncAwaitLibrary/Sources/PetstoreClient/Infrastructure/SynchronizedDictionary.swift @@ -6,7 +6,7 @@ import Foundation -internal struct SynchronizedDictionary : @unchecked Sendable { +internal class SynchronizedDictionary : @unchecked Sendable { private var dictionary = [K: V]() private let lock = NSRecursiveLock() diff --git a/samples/client/petstore/swift6/asyncAwaitLibrary/Sources/PetstoreClient/Infrastructure/URLSessionImplementations.swift b/samples/client/petstore/swift6/asyncAwaitLibrary/Sources/PetstoreClient/Infrastructure/URLSessionImplementations.swift index 30cff02eb977..d6f1ac09c429 100644 --- a/samples/client/petstore/swift6/asyncAwaitLibrary/Sources/PetstoreClient/Infrastructure/URLSessionImplementations.swift +++ b/samples/client/petstore/swift6/asyncAwaitLibrary/Sources/PetstoreClient/Infrastructure/URLSessionImplementations.swift @@ -66,7 +66,7 @@ fileprivate class URLSessionRequestBuilderConfiguration: @unchecked Sendable { let defaultURLSession: URLSession // Store current URLCredential for every URLSessionTask - var credentialStore = SynchronizedDictionary() + let credentialStore = SynchronizedDictionary() } open class URLSessionRequestBuilder: RequestBuilder, @unchecked Sendable { diff --git a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/SynchronizedDictionary.swift b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/SynchronizedDictionary.swift index 24a1f3224a19..0d2714ca7b02 100644 --- a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/SynchronizedDictionary.swift +++ b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/SynchronizedDictionary.swift @@ -6,7 +6,7 @@ import Foundation -internal struct SynchronizedDictionary : @unchecked Sendable { +internal class SynchronizedDictionary : @unchecked Sendable { private var dictionary = [K: V]() private let lock = NSRecursiveLock() diff --git a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/URLSessionImplementations.swift b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/URLSessionImplementations.swift index 30cff02eb977..d6f1ac09c429 100644 --- a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/URLSessionImplementations.swift +++ b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/URLSessionImplementations.swift @@ -66,7 +66,7 @@ fileprivate class URLSessionRequestBuilderConfiguration: @unchecked Sendable { let defaultURLSession: URLSession // Store current URLCredential for every URLSessionTask - var credentialStore = SynchronizedDictionary() + let credentialStore = SynchronizedDictionary() } open class URLSessionRequestBuilder: RequestBuilder, @unchecked Sendable { diff --git a/samples/client/petstore/swift6/combineLibrary/Sources/CombineLibrary/Infrastructure/SynchronizedDictionary.swift b/samples/client/petstore/swift6/combineLibrary/Sources/CombineLibrary/Infrastructure/SynchronizedDictionary.swift index 24a1f3224a19..0d2714ca7b02 100644 --- a/samples/client/petstore/swift6/combineLibrary/Sources/CombineLibrary/Infrastructure/SynchronizedDictionary.swift +++ b/samples/client/petstore/swift6/combineLibrary/Sources/CombineLibrary/Infrastructure/SynchronizedDictionary.swift @@ -6,7 +6,7 @@ import Foundation -internal struct SynchronizedDictionary : @unchecked Sendable { +internal class SynchronizedDictionary : @unchecked Sendable { private var dictionary = [K: V]() private let lock = NSRecursiveLock() diff --git a/samples/client/petstore/swift6/combineLibrary/Sources/CombineLibrary/Infrastructure/URLSessionImplementations.swift b/samples/client/petstore/swift6/combineLibrary/Sources/CombineLibrary/Infrastructure/URLSessionImplementations.swift index 30cff02eb977..d6f1ac09c429 100644 --- a/samples/client/petstore/swift6/combineLibrary/Sources/CombineLibrary/Infrastructure/URLSessionImplementations.swift +++ b/samples/client/petstore/swift6/combineLibrary/Sources/CombineLibrary/Infrastructure/URLSessionImplementations.swift @@ -66,7 +66,7 @@ fileprivate class URLSessionRequestBuilderConfiguration: @unchecked Sendable { let defaultURLSession: URLSession // Store current URLCredential for every URLSessionTask - var credentialStore = SynchronizedDictionary() + let credentialStore = SynchronizedDictionary() } open class URLSessionRequestBuilder: RequestBuilder, @unchecked Sendable { diff --git a/samples/client/petstore/swift6/default/Sources/PetstoreClient/Infrastructure/SynchronizedDictionary.swift b/samples/client/petstore/swift6/default/Sources/PetstoreClient/Infrastructure/SynchronizedDictionary.swift index 24a1f3224a19..0d2714ca7b02 100644 --- a/samples/client/petstore/swift6/default/Sources/PetstoreClient/Infrastructure/SynchronizedDictionary.swift +++ b/samples/client/petstore/swift6/default/Sources/PetstoreClient/Infrastructure/SynchronizedDictionary.swift @@ -6,7 +6,7 @@ import Foundation -internal struct SynchronizedDictionary : @unchecked Sendable { +internal class SynchronizedDictionary : @unchecked Sendable { private var dictionary = [K: V]() private let lock = NSRecursiveLock() diff --git a/samples/client/petstore/swift6/default/Sources/PetstoreClient/Infrastructure/URLSessionImplementations.swift b/samples/client/petstore/swift6/default/Sources/PetstoreClient/Infrastructure/URLSessionImplementations.swift index 30cff02eb977..d6f1ac09c429 100644 --- a/samples/client/petstore/swift6/default/Sources/PetstoreClient/Infrastructure/URLSessionImplementations.swift +++ b/samples/client/petstore/swift6/default/Sources/PetstoreClient/Infrastructure/URLSessionImplementations.swift @@ -66,7 +66,7 @@ fileprivate class URLSessionRequestBuilderConfiguration: @unchecked Sendable { let defaultURLSession: URLSession // Store current URLCredential for every URLSessionTask - var credentialStore = SynchronizedDictionary() + let credentialStore = SynchronizedDictionary() } open class URLSessionRequestBuilder: RequestBuilder, @unchecked Sendable { diff --git a/samples/client/petstore/swift6/objcCompatible/Sources/PetstoreClient/Infrastructure/SynchronizedDictionary.swift b/samples/client/petstore/swift6/objcCompatible/Sources/PetstoreClient/Infrastructure/SynchronizedDictionary.swift index 24a1f3224a19..0d2714ca7b02 100644 --- a/samples/client/petstore/swift6/objcCompatible/Sources/PetstoreClient/Infrastructure/SynchronizedDictionary.swift +++ b/samples/client/petstore/swift6/objcCompatible/Sources/PetstoreClient/Infrastructure/SynchronizedDictionary.swift @@ -6,7 +6,7 @@ import Foundation -internal struct SynchronizedDictionary : @unchecked Sendable { +internal class SynchronizedDictionary : @unchecked Sendable { private var dictionary = [K: V]() private let lock = NSRecursiveLock() diff --git a/samples/client/petstore/swift6/objcCompatible/Sources/PetstoreClient/Infrastructure/URLSessionImplementations.swift b/samples/client/petstore/swift6/objcCompatible/Sources/PetstoreClient/Infrastructure/URLSessionImplementations.swift index 30cff02eb977..d6f1ac09c429 100644 --- a/samples/client/petstore/swift6/objcCompatible/Sources/PetstoreClient/Infrastructure/URLSessionImplementations.swift +++ b/samples/client/petstore/swift6/objcCompatible/Sources/PetstoreClient/Infrastructure/URLSessionImplementations.swift @@ -66,7 +66,7 @@ fileprivate class URLSessionRequestBuilderConfiguration: @unchecked Sendable { let defaultURLSession: URLSession // Store current URLCredential for every URLSessionTask - var credentialStore = SynchronizedDictionary() + let credentialStore = SynchronizedDictionary() } open class URLSessionRequestBuilder: RequestBuilder, @unchecked Sendable { diff --git a/samples/client/petstore/swift6/oneOf/PetstoreClient/Classes/OpenAPIs/Infrastructure/SynchronizedDictionary.swift b/samples/client/petstore/swift6/oneOf/PetstoreClient/Classes/OpenAPIs/Infrastructure/SynchronizedDictionary.swift index 24a1f3224a19..0d2714ca7b02 100644 --- a/samples/client/petstore/swift6/oneOf/PetstoreClient/Classes/OpenAPIs/Infrastructure/SynchronizedDictionary.swift +++ b/samples/client/petstore/swift6/oneOf/PetstoreClient/Classes/OpenAPIs/Infrastructure/SynchronizedDictionary.swift @@ -6,7 +6,7 @@ import Foundation -internal struct SynchronizedDictionary : @unchecked Sendable { +internal class SynchronizedDictionary : @unchecked Sendable { private var dictionary = [K: V]() private let lock = NSRecursiveLock() diff --git a/samples/client/petstore/swift6/oneOf/PetstoreClient/Classes/OpenAPIs/Infrastructure/URLSessionImplementations.swift b/samples/client/petstore/swift6/oneOf/PetstoreClient/Classes/OpenAPIs/Infrastructure/URLSessionImplementations.swift index 30cff02eb977..d6f1ac09c429 100644 --- a/samples/client/petstore/swift6/oneOf/PetstoreClient/Classes/OpenAPIs/Infrastructure/URLSessionImplementations.swift +++ b/samples/client/petstore/swift6/oneOf/PetstoreClient/Classes/OpenAPIs/Infrastructure/URLSessionImplementations.swift @@ -66,7 +66,7 @@ fileprivate class URLSessionRequestBuilderConfiguration: @unchecked Sendable { let defaultURLSession: URLSession // Store current URLCredential for every URLSessionTask - var credentialStore = SynchronizedDictionary() + let credentialStore = SynchronizedDictionary() } open class URLSessionRequestBuilder: RequestBuilder, @unchecked Sendable { diff --git a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/SynchronizedDictionary.swift b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/SynchronizedDictionary.swift index 24a1f3224a19..0d2714ca7b02 100644 --- a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/SynchronizedDictionary.swift +++ b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/SynchronizedDictionary.swift @@ -6,7 +6,7 @@ import Foundation -internal struct SynchronizedDictionary : @unchecked Sendable { +internal class SynchronizedDictionary : @unchecked Sendable { private var dictionary = [K: V]() private let lock = NSRecursiveLock() diff --git a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/URLSessionImplementations.swift b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/URLSessionImplementations.swift index 30cff02eb977..d6f1ac09c429 100644 --- a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/URLSessionImplementations.swift +++ b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/URLSessionImplementations.swift @@ -66,7 +66,7 @@ fileprivate class URLSessionRequestBuilderConfiguration: @unchecked Sendable { let defaultURLSession: URLSession // Store current URLCredential for every URLSessionTask - var credentialStore = SynchronizedDictionary() + let credentialStore = SynchronizedDictionary() } open class URLSessionRequestBuilder: RequestBuilder, @unchecked Sendable { diff --git a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/SynchronizedDictionary.swift b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/SynchronizedDictionary.swift index 24a1f3224a19..0d2714ca7b02 100644 --- a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/SynchronizedDictionary.swift +++ b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/SynchronizedDictionary.swift @@ -6,7 +6,7 @@ import Foundation -internal struct SynchronizedDictionary : @unchecked Sendable { +internal class SynchronizedDictionary : @unchecked Sendable { private var dictionary = [K: V]() private let lock = NSRecursiveLock() diff --git a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/URLSessionImplementations.swift b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/URLSessionImplementations.swift index 53841c2b711f..04303b9a0237 100644 --- a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/URLSessionImplementations.swift +++ b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/URLSessionImplementations.swift @@ -66,7 +66,7 @@ fileprivate class URLSessionRequestBuilderConfiguration: @unchecked Sendable { let defaultURLSession: URLSession // Store current URLCredential for every URLSessionTask - var credentialStore = SynchronizedDictionary() + let credentialStore = SynchronizedDictionary() } internal class URLSessionRequestBuilder: RequestBuilder, @unchecked Sendable { diff --git a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/SynchronizedDictionary.swift b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/SynchronizedDictionary.swift index 24a1f3224a19..0d2714ca7b02 100644 --- a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/SynchronizedDictionary.swift +++ b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/SynchronizedDictionary.swift @@ -6,7 +6,7 @@ import Foundation -internal struct SynchronizedDictionary : @unchecked Sendable { +internal class SynchronizedDictionary : @unchecked Sendable { private var dictionary = [K: V]() private let lock = NSRecursiveLock() diff --git a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/URLSessionImplementations.swift b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/URLSessionImplementations.swift index 30cff02eb977..d6f1ac09c429 100644 --- a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/URLSessionImplementations.swift +++ b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/URLSessionImplementations.swift @@ -66,7 +66,7 @@ fileprivate class URLSessionRequestBuilderConfiguration: @unchecked Sendable { let defaultURLSession: URLSession // Store current URLCredential for every URLSessionTask - var credentialStore = SynchronizedDictionary() + let credentialStore = SynchronizedDictionary() } open class URLSessionRequestBuilder: RequestBuilder, @unchecked Sendable { diff --git a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Infrastructure/SynchronizedDictionary.swift b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Infrastructure/SynchronizedDictionary.swift index 24a1f3224a19..0d2714ca7b02 100644 --- a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Infrastructure/SynchronizedDictionary.swift +++ b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Infrastructure/SynchronizedDictionary.swift @@ -6,7 +6,7 @@ import Foundation -internal struct SynchronizedDictionary : @unchecked Sendable { +internal class SynchronizedDictionary : @unchecked Sendable { private var dictionary = [K: V]() private let lock = NSRecursiveLock() diff --git a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Infrastructure/URLSessionImplementations.swift b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Infrastructure/URLSessionImplementations.swift index 30cff02eb977..d6f1ac09c429 100644 --- a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Infrastructure/URLSessionImplementations.swift +++ b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Infrastructure/URLSessionImplementations.swift @@ -66,7 +66,7 @@ fileprivate class URLSessionRequestBuilderConfiguration: @unchecked Sendable { let defaultURLSession: URLSession // Store current URLCredential for every URLSessionTask - var credentialStore = SynchronizedDictionary() + let credentialStore = SynchronizedDictionary() } open class URLSessionRequestBuilder: RequestBuilder, @unchecked Sendable { diff --git a/samples/client/petstore/swift6/validation/PetstoreClient/Classes/OpenAPIs/Infrastructure/SynchronizedDictionary.swift b/samples/client/petstore/swift6/validation/PetstoreClient/Classes/OpenAPIs/Infrastructure/SynchronizedDictionary.swift index 24a1f3224a19..0d2714ca7b02 100644 --- a/samples/client/petstore/swift6/validation/PetstoreClient/Classes/OpenAPIs/Infrastructure/SynchronizedDictionary.swift +++ b/samples/client/petstore/swift6/validation/PetstoreClient/Classes/OpenAPIs/Infrastructure/SynchronizedDictionary.swift @@ -6,7 +6,7 @@ import Foundation -internal struct SynchronizedDictionary : @unchecked Sendable { +internal class SynchronizedDictionary : @unchecked Sendable { private var dictionary = [K: V]() private let lock = NSRecursiveLock() diff --git a/samples/client/petstore/swift6/validation/PetstoreClient/Classes/OpenAPIs/Infrastructure/URLSessionImplementations.swift b/samples/client/petstore/swift6/validation/PetstoreClient/Classes/OpenAPIs/Infrastructure/URLSessionImplementations.swift index 30cff02eb977..d6f1ac09c429 100644 --- a/samples/client/petstore/swift6/validation/PetstoreClient/Classes/OpenAPIs/Infrastructure/URLSessionImplementations.swift +++ b/samples/client/petstore/swift6/validation/PetstoreClient/Classes/OpenAPIs/Infrastructure/URLSessionImplementations.swift @@ -66,7 +66,7 @@ fileprivate class URLSessionRequestBuilderConfiguration: @unchecked Sendable { let defaultURLSession: URLSession // Store current URLCredential for every URLSessionTask - var credentialStore = SynchronizedDictionary() + let credentialStore = SynchronizedDictionary() } open class URLSessionRequestBuilder: RequestBuilder, @unchecked Sendable {