diff --git a/modules/openapi-generator/src/main/resources/swift6/Validation.mustache b/modules/openapi-generator/src/main/resources/swift6/Validation.mustache index 1197e79dfd7..148a5123760 100644 --- a/modules/openapi-generator/src/main/resources/swift6/Validation.mustache +++ b/modules/openapi-generator/src/main/resources/swift6/Validation.mustache @@ -6,21 +6,22 @@ import Foundation -{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} struct StringRule: @unchecked Sendable { +{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} struct StringRule: Sendable { {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} var minLength: Int? {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} var maxLength: Int? {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} var pattern: String? } -{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} struct NumericRule: @unchecked Sendable { +{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} struct NumericRule { {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} var minimum: T? {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} var exclusiveMinimum = false {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} var maximum: T? {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} var exclusiveMaximum = false {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} var multipleOf: T? } +extension NumericRule: Sendable where T: Sendable {} -{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} struct ArrayRule: @unchecked Sendable { +{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} struct ArrayRule: Sendable { {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} var minItems: Int? {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} var maxItems: Int? {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} var uniqueItems: Bool diff --git a/samples/client/petstore/swift6/alamofireLibrary/Sources/PetstoreClient/Infrastructure/Validation.swift b/samples/client/petstore/swift6/alamofireLibrary/Sources/PetstoreClient/Infrastructure/Validation.swift index b17dc24c155..f2824965ddf 100644 --- a/samples/client/petstore/swift6/alamofireLibrary/Sources/PetstoreClient/Infrastructure/Validation.swift +++ b/samples/client/petstore/swift6/alamofireLibrary/Sources/PetstoreClient/Infrastructure/Validation.swift @@ -6,21 +6,22 @@ import Foundation -public struct StringRule: @unchecked Sendable { +public struct StringRule: Sendable { public var minLength: Int? public var maxLength: Int? public var pattern: String? } -public struct NumericRule: @unchecked Sendable { +public struct NumericRule { public var minimum: T? public var exclusiveMinimum = false public var maximum: T? public var exclusiveMaximum = false public var multipleOf: T? } +extension NumericRule: Sendable where T: Sendable {} -public struct ArrayRule: @unchecked Sendable { +public struct ArrayRule: Sendable { public var minItems: Int? public var maxItems: Int? public var uniqueItems: Bool diff --git a/samples/client/petstore/swift6/apiNonStaticMethod/Sources/PetstoreClient/Infrastructure/Validation.swift b/samples/client/petstore/swift6/apiNonStaticMethod/Sources/PetstoreClient/Infrastructure/Validation.swift index b17dc24c155..f2824965ddf 100644 --- a/samples/client/petstore/swift6/apiNonStaticMethod/Sources/PetstoreClient/Infrastructure/Validation.swift +++ b/samples/client/petstore/swift6/apiNonStaticMethod/Sources/PetstoreClient/Infrastructure/Validation.swift @@ -6,21 +6,22 @@ import Foundation -public struct StringRule: @unchecked Sendable { +public struct StringRule: Sendable { public var minLength: Int? public var maxLength: Int? public var pattern: String? } -public struct NumericRule: @unchecked Sendable { +public struct NumericRule { public var minimum: T? public var exclusiveMinimum = false public var maximum: T? public var exclusiveMaximum = false public var multipleOf: T? } +extension NumericRule: Sendable where T: Sendable {} -public struct ArrayRule: @unchecked Sendable { +public struct ArrayRule: Sendable { public var minItems: Int? public var maxItems: Int? public var uniqueItems: Bool diff --git a/samples/client/petstore/swift6/asyncAwaitLibrary/Sources/PetstoreClient/Infrastructure/Validation.swift b/samples/client/petstore/swift6/asyncAwaitLibrary/Sources/PetstoreClient/Infrastructure/Validation.swift index b17dc24c155..f2824965ddf 100644 --- a/samples/client/petstore/swift6/asyncAwaitLibrary/Sources/PetstoreClient/Infrastructure/Validation.swift +++ b/samples/client/petstore/swift6/asyncAwaitLibrary/Sources/PetstoreClient/Infrastructure/Validation.swift @@ -6,21 +6,22 @@ import Foundation -public struct StringRule: @unchecked Sendable { +public struct StringRule: Sendable { public var minLength: Int? public var maxLength: Int? public var pattern: String? } -public struct NumericRule: @unchecked Sendable { +public struct NumericRule { public var minimum: T? public var exclusiveMinimum = false public var maximum: T? public var exclusiveMaximum = false public var multipleOf: T? } +extension NumericRule: Sendable where T: Sendable {} -public struct ArrayRule: @unchecked Sendable { +public struct ArrayRule: Sendable { public var minItems: Int? public var maxItems: Int? public var uniqueItems: Bool diff --git a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/Validation.swift b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/Validation.swift index b17dc24c155..f2824965ddf 100644 --- a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/Validation.swift +++ b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/Validation.swift @@ -6,21 +6,22 @@ import Foundation -public struct StringRule: @unchecked Sendable { +public struct StringRule: Sendable { public var minLength: Int? public var maxLength: Int? public var pattern: String? } -public struct NumericRule: @unchecked Sendable { +public struct NumericRule { public var minimum: T? public var exclusiveMinimum = false public var maximum: T? public var exclusiveMaximum = false public var multipleOf: T? } +extension NumericRule: Sendable where T: Sendable {} -public struct ArrayRule: @unchecked Sendable { +public struct ArrayRule: Sendable { public var minItems: Int? public var maxItems: Int? public var uniqueItems: Bool diff --git a/samples/client/petstore/swift6/combineLibrary/Sources/CombineLibrary/Infrastructure/Validation.swift b/samples/client/petstore/swift6/combineLibrary/Sources/CombineLibrary/Infrastructure/Validation.swift index b17dc24c155..f2824965ddf 100644 --- a/samples/client/petstore/swift6/combineLibrary/Sources/CombineLibrary/Infrastructure/Validation.swift +++ b/samples/client/petstore/swift6/combineLibrary/Sources/CombineLibrary/Infrastructure/Validation.swift @@ -6,21 +6,22 @@ import Foundation -public struct StringRule: @unchecked Sendable { +public struct StringRule: Sendable { public var minLength: Int? public var maxLength: Int? public var pattern: String? } -public struct NumericRule: @unchecked Sendable { +public struct NumericRule { public var minimum: T? public var exclusiveMinimum = false public var maximum: T? public var exclusiveMaximum = false public var multipleOf: T? } +extension NumericRule: Sendable where T: Sendable {} -public struct ArrayRule: @unchecked Sendable { +public struct ArrayRule: Sendable { public var minItems: Int? public var maxItems: Int? public var uniqueItems: Bool diff --git a/samples/client/petstore/swift6/default/Sources/PetstoreClient/Infrastructure/Validation.swift b/samples/client/petstore/swift6/default/Sources/PetstoreClient/Infrastructure/Validation.swift index b17dc24c155..f2824965ddf 100644 --- a/samples/client/petstore/swift6/default/Sources/PetstoreClient/Infrastructure/Validation.swift +++ b/samples/client/petstore/swift6/default/Sources/PetstoreClient/Infrastructure/Validation.swift @@ -6,21 +6,22 @@ import Foundation -public struct StringRule: @unchecked Sendable { +public struct StringRule: Sendable { public var minLength: Int? public var maxLength: Int? public var pattern: String? } -public struct NumericRule: @unchecked Sendable { +public struct NumericRule { public var minimum: T? public var exclusiveMinimum = false public var maximum: T? public var exclusiveMaximum = false public var multipleOf: T? } +extension NumericRule: Sendable where T: Sendable {} -public struct ArrayRule: @unchecked Sendable { +public struct ArrayRule: Sendable { public var minItems: Int? public var maxItems: Int? public var uniqueItems: Bool diff --git a/samples/client/petstore/swift6/objcCompatible/Sources/PetstoreClient/Infrastructure/Validation.swift b/samples/client/petstore/swift6/objcCompatible/Sources/PetstoreClient/Infrastructure/Validation.swift index b17dc24c155..f2824965ddf 100644 --- a/samples/client/petstore/swift6/objcCompatible/Sources/PetstoreClient/Infrastructure/Validation.swift +++ b/samples/client/petstore/swift6/objcCompatible/Sources/PetstoreClient/Infrastructure/Validation.swift @@ -6,21 +6,22 @@ import Foundation -public struct StringRule: @unchecked Sendable { +public struct StringRule: Sendable { public var minLength: Int? public var maxLength: Int? public var pattern: String? } -public struct NumericRule: @unchecked Sendable { +public struct NumericRule { public var minimum: T? public var exclusiveMinimum = false public var maximum: T? public var exclusiveMaximum = false public var multipleOf: T? } +extension NumericRule: Sendable where T: Sendable {} -public struct ArrayRule: @unchecked Sendable { +public struct ArrayRule: Sendable { public var minItems: Int? public var maxItems: Int? public var uniqueItems: Bool diff --git a/samples/client/petstore/swift6/oneOf/PetstoreClient/Classes/OpenAPIs/Infrastructure/Validation.swift b/samples/client/petstore/swift6/oneOf/PetstoreClient/Classes/OpenAPIs/Infrastructure/Validation.swift index b17dc24c155..f2824965ddf 100644 --- a/samples/client/petstore/swift6/oneOf/PetstoreClient/Classes/OpenAPIs/Infrastructure/Validation.swift +++ b/samples/client/petstore/swift6/oneOf/PetstoreClient/Classes/OpenAPIs/Infrastructure/Validation.swift @@ -6,21 +6,22 @@ import Foundation -public struct StringRule: @unchecked Sendable { +public struct StringRule: Sendable { public var minLength: Int? public var maxLength: Int? public var pattern: String? } -public struct NumericRule: @unchecked Sendable { +public struct NumericRule { public var minimum: T? public var exclusiveMinimum = false public var maximum: T? public var exclusiveMaximum = false public var multipleOf: T? } +extension NumericRule: Sendable where T: Sendable {} -public struct ArrayRule: @unchecked Sendable { +public struct ArrayRule: Sendable { public var minItems: Int? public var maxItems: Int? public var uniqueItems: Bool diff --git a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/Validation.swift b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/Validation.swift index b17dc24c155..f2824965ddf 100644 --- a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/Validation.swift +++ b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/Validation.swift @@ -6,21 +6,22 @@ import Foundation -public struct StringRule: @unchecked Sendable { +public struct StringRule: Sendable { public var minLength: Int? public var maxLength: Int? public var pattern: String? } -public struct NumericRule: @unchecked Sendable { +public struct NumericRule { public var minimum: T? public var exclusiveMinimum = false public var maximum: T? public var exclusiveMaximum = false public var multipleOf: T? } +extension NumericRule: Sendable where T: Sendable {} -public struct ArrayRule: @unchecked Sendable { +public struct ArrayRule: Sendable { public var minItems: Int? public var maxItems: Int? public var uniqueItems: Bool diff --git a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/Validation.swift b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/Validation.swift index 05a01edb09b..f9a3750d668 100644 --- a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/Validation.swift +++ b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/Validation.swift @@ -6,21 +6,22 @@ import Foundation -internal struct StringRule: @unchecked Sendable { +internal struct StringRule: Sendable { internal var minLength: Int? internal var maxLength: Int? internal var pattern: String? } -internal struct NumericRule: @unchecked Sendable { +internal struct NumericRule { internal var minimum: T? internal var exclusiveMinimum = false internal var maximum: T? internal var exclusiveMaximum = false internal var multipleOf: T? } +extension NumericRule: Sendable where T: Sendable {} -internal struct ArrayRule: @unchecked Sendable { +internal struct ArrayRule: Sendable { internal var minItems: Int? internal var maxItems: Int? internal var uniqueItems: Bool diff --git a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/Validation.swift b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/Validation.swift index b17dc24c155..f2824965ddf 100644 --- a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/Validation.swift +++ b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/Validation.swift @@ -6,21 +6,22 @@ import Foundation -public struct StringRule: @unchecked Sendable { +public struct StringRule: Sendable { public var minLength: Int? public var maxLength: Int? public var pattern: String? } -public struct NumericRule: @unchecked Sendable { +public struct NumericRule { public var minimum: T? public var exclusiveMinimum = false public var maximum: T? public var exclusiveMaximum = false public var multipleOf: T? } +extension NumericRule: Sendable where T: Sendable {} -public struct ArrayRule: @unchecked Sendable { +public struct ArrayRule: Sendable { public var minItems: Int? public var maxItems: Int? public var uniqueItems: Bool diff --git a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Infrastructure/Validation.swift b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Infrastructure/Validation.swift index b17dc24c155..f2824965ddf 100644 --- a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Infrastructure/Validation.swift +++ b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Infrastructure/Validation.swift @@ -6,21 +6,22 @@ import Foundation -public struct StringRule: @unchecked Sendable { +public struct StringRule: Sendable { public var minLength: Int? public var maxLength: Int? public var pattern: String? } -public struct NumericRule: @unchecked Sendable { +public struct NumericRule { public var minimum: T? public var exclusiveMinimum = false public var maximum: T? public var exclusiveMaximum = false public var multipleOf: T? } +extension NumericRule: Sendable where T: Sendable {} -public struct ArrayRule: @unchecked Sendable { +public struct ArrayRule: Sendable { public var minItems: Int? public var maxItems: Int? public var uniqueItems: Bool diff --git a/samples/client/petstore/swift6/validation/PetstoreClient/Classes/OpenAPIs/Infrastructure/Validation.swift b/samples/client/petstore/swift6/validation/PetstoreClient/Classes/OpenAPIs/Infrastructure/Validation.swift index b17dc24c155..f2824965ddf 100644 --- a/samples/client/petstore/swift6/validation/PetstoreClient/Classes/OpenAPIs/Infrastructure/Validation.swift +++ b/samples/client/petstore/swift6/validation/PetstoreClient/Classes/OpenAPIs/Infrastructure/Validation.swift @@ -6,21 +6,22 @@ import Foundation -public struct StringRule: @unchecked Sendable { +public struct StringRule: Sendable { public var minLength: Int? public var maxLength: Int? public var pattern: String? } -public struct NumericRule: @unchecked Sendable { +public struct NumericRule { public var minimum: T? public var exclusiveMinimum = false public var maximum: T? public var exclusiveMaximum = false public var multipleOf: T? } +extension NumericRule: Sendable where T: Sendable {} -public struct ArrayRule: @unchecked Sendable { +public struct ArrayRule: Sendable { public var minItems: Int? public var maxItems: Int? public var uniqueItems: Bool diff --git a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Infrastructure/Validation.swift b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Infrastructure/Validation.swift index b17dc24c155..f2824965ddf 100644 --- a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Infrastructure/Validation.swift +++ b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Infrastructure/Validation.swift @@ -6,21 +6,22 @@ import Foundation -public struct StringRule: @unchecked Sendable { +public struct StringRule: Sendable { public var minLength: Int? public var maxLength: Int? public var pattern: String? } -public struct NumericRule: @unchecked Sendable { +public struct NumericRule { public var minimum: T? public var exclusiveMinimum = false public var maximum: T? public var exclusiveMaximum = false public var multipleOf: T? } +extension NumericRule: Sendable where T: Sendable {} -public struct ArrayRule: @unchecked Sendable { +public struct ArrayRule: Sendable { public var minItems: Int? public var maxItems: Int? public var uniqueItems: Bool