Skip to content

Commit 00dbe59

Browse files
authored
[swift6] Add Sendable conformance to structs and enums (OpenAPITools#20013)
1 parent 67af02c commit 00dbe59

File tree

447 files changed

+668
-639
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

447 files changed

+668
-639
lines changed

bin/configs/swift6-urlsessionLibrary.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,5 @@ additionalProperties:
1313
useSPMFileStructure: true
1414
mapFileBinaryToData: true
1515
useClasses: true
16+
readonlyProperties: true
1617
swiftUseApiNamespace: true

modules/openapi-generator/src/main/resources/swift6/JSONValue.mustache

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import Foundation
99

10-
{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} enum JSONValue: Codable, Hashable {
10+
{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} enum JSONValue: Sendable, Codable, Hashable {
1111
case string(String)
1212
case int(Int)
1313
case double(Double)

modules/openapi-generator/src/main/resources/swift6/Models.mustache

+2
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ extension CaseIterableDefaultsLast {
4444
case encodeValue(Wrapped)
4545
}
4646

47+
extension NullEncodable: Sendable where Wrapped: Sendable {}
48+
4749
extension NullEncodable: Codable where Wrapped: Codable {
4850
{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} init(from decoder: Decoder) throws {
4951
let container = try decoder.singleValueContainer()

modules/openapi-generator/src/main/resources/swift6/OpenAPIDateWithoutTime.mustache

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import Foundation
1515
/// an appropriate padding in order to transform to GMT+0 which is the assumed timezone in ISO 8601.
1616
/// When decoding, GMT+0 can be assumed (again: ISO8601) so there is no padding necessary and wrappedDate
1717
/// can be used safely.
18-
{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} struct OpenAPIDateWithoutTime: Codable, Hashable, Equatable {
18+
{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} struct OpenAPIDateWithoutTime: Sendable, Codable, Hashable, Equatable {
1919
{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} let wrappedDate: Date
2020
{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} let timezone: TimeZone
2121

modules/openapi-generator/src/main/resources/swift6/SynchronizedDictionary.mustache

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
import Foundation
88

9-
internal struct SynchronizedDictionary<K: Hashable, V> {
9+
internal struct SynchronizedDictionary<K: Hashable, V> : @unchecked Sendable {
1010
1111
private var dictionary = [K: V]()
1212
private let lock = NSRecursiveLock()

modules/openapi-generator/src/main/resources/swift6/modelEnum.mustache

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} enum {{classname}}: {{dataType}}, {{#useVapor}}Content, Hashable{{/useVapor}}{{^useVapor}}Codable{{^isString}}{{^isInteger}}{{^isFloat}}{{^isDouble}}, JSONEncodable{{/isDouble}}{{/isFloat}}{{/isInteger}}{{/isString}}{{/useVapor}}, CaseIterable{{#enumUnknownDefaultCase}}{{#isInteger}}, CaseIterableDefaultsLast{{/isInteger}}{{#isFloat}}, CaseIterableDefaultsLast{{/isFloat}}{{#isDouble}}, CaseIterableDefaultsLast{{/isDouble}}{{#isString}}, CaseIterableDefaultsLast{{/isString}}{{/enumUnknownDefaultCase}} {
1+
{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} enum {{classname}}: {{dataType}}, Sendable, {{#useVapor}}Content, Hashable{{/useVapor}}{{^useVapor}}Codable{{^isString}}{{^isInteger}}{{^isFloat}}{{^isDouble}}, JSONEncodable{{/isDouble}}{{/isFloat}}{{/isInteger}}{{/isString}}{{/useVapor}}, CaseIterable{{#enumUnknownDefaultCase}}{{#isInteger}}, CaseIterableDefaultsLast{{/isInteger}}{{#isFloat}}, CaseIterableDefaultsLast{{/isFloat}}{{#isDouble}}, CaseIterableDefaultsLast{{/isDouble}}{{#isString}}, CaseIterableDefaultsLast{{/isString}}{{/enumUnknownDefaultCase}} {
22
{{#allowableValues}}
33
{{#enumVars}}
44
case {{{name}}} = {{{value}}}

modules/openapi-generator/src/main/resources/swift6/modelInlineEnumDeclaration.mustache

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} enum {{enumName}}: {{^isContainer}}{{dataType}}{{/isContainer}}{{#isContainer}}String{{/isContainer}}, {{#useVapor}}Content, Hashable{{/useVapor}}{{^useVapor}}Codable{{^isContainer}}{{^isString}}{{^isInteger}}{{^isFloat}}{{^isDouble}}, JSONEncodable{{/isDouble}}{{/isFloat}}{{/isInteger}}{{/isString}}{{/isContainer}}{{/useVapor}}, CaseIterable{{#enumUnknownDefaultCase}}{{#isInteger}}, CaseIterableDefaultsLast{{/isInteger}}{{#isFloat}}, CaseIterableDefaultsLast{{/isFloat}}{{#isDouble}}, CaseIterableDefaultsLast{{/isDouble}}{{#isString}}, CaseIterableDefaultsLast{{/isString}}{{#isContainer}}, CaseIterableDefaultsLast{{/isContainer}}{{/enumUnknownDefaultCase}} {
1+
{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} enum {{enumName}}: {{^isContainer}}{{dataType}}{{/isContainer}}{{#isContainer}}String{{/isContainer}}, Sendable, {{#useVapor}}Content, Hashable{{/useVapor}}{{^useVapor}}Codable{{^isContainer}}{{^isString}}{{^isInteger}}{{^isFloat}}{{^isDouble}}, JSONEncodable{{/isDouble}}{{/isFloat}}{{/isInteger}}{{/isString}}{{/isContainer}}{{/useVapor}}, CaseIterable{{#enumUnknownDefaultCase}}{{#isInteger}}, CaseIterableDefaultsLast{{/isInteger}}{{#isFloat}}, CaseIterableDefaultsLast{{/isFloat}}{{#isDouble}}, CaseIterableDefaultsLast{{/isDouble}}{{#isString}}, CaseIterableDefaultsLast{{/isString}}{{#isContainer}}, CaseIterableDefaultsLast{{/isContainer}}{{/enumUnknownDefaultCase}} {
22
{{#allowableValues}}
33
{{#enumVars}}
44
case {{{name}}} = {{{value}}}

modules/openapi-generator/src/main/resources/swift6/modelObject.mustache

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{^objcCompatible}}{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} {{#useClasses}}final class{{/useClasses}}{{^useClasses}}struct{{/useClasses}} {{{classname}}}: {{#useVapor}}Content{{/useVapor}}{{^useVapor}}Codable{{#useJsonEncodable}}, JSONEncodable{{/useJsonEncodable}}{{/useVapor}}{{#vendorExtensions.x-swift-hashable}}, Hashable{{/vendorExtensions.x-swift-hashable}} {
1+
{{^objcCompatible}}{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} {{#useClasses}}final class{{/useClasses}}{{^useClasses}}struct{{/useClasses}} {{{classname}}}: {{^useClasses}}Sendable, {{/useClasses}}{{#useClasses}}{{#readonlyProperties}}@unchecked Sendable, {{/readonlyProperties}}{{/useClasses}}{{#useVapor}}Content{{/useVapor}}{{^useVapor}}Codable{{#useJsonEncodable}}, JSONEncodable{{/useJsonEncodable}}{{/useVapor}}{{#vendorExtensions.x-swift-hashable}}, Hashable{{/vendorExtensions.x-swift-hashable}} {
22
{{/objcCompatible}}{{#objcCompatible}}@objcMembers {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} class {{classname}}: NSObject, Codable{{#useJsonEncodable}}, JSONEncodable{{/useJsonEncodable}} {
33
{{/objcCompatible}}
44

modules/openapi-generator/src/main/resources/swift6/modelOneOf.mustache

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} enum {{classname}}: {{#useVapor}}Content{{/useVapor}}{{^useVapor}}Codable, JSONEncodable{{#vendorExtensions.x-swift-hashable}}, Hashable{{/vendorExtensions.x-swift-hashable}}{{/useVapor}} {
1+
{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} enum {{classname}}: {{^useClasses}}Sendable, {{/useClasses}}{{#useClasses}}{{#readonlyProperties}}Sendable, {{/readonlyProperties}}{{/useClasses}}{{#useVapor}}Content{{/useVapor}}{{^useVapor}}Codable, JSONEncodable{{#vendorExtensions.x-swift-hashable}}, Hashable{{/vendorExtensions.x-swift-hashable}}{{/useVapor}} {
22
{{#oneOf}}
33
case type{{.}}({{.}})
44
{{/oneOf}}

samples/client/petstore/swift6/alamofireLibrary/Sources/PetstoreClient/Infrastructure/JSONValue.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import Foundation
99

10-
public enum JSONValue: Codable, Hashable {
10+
public enum JSONValue: Sendable, Codable, Hashable {
1111
case string(String)
1212
case int(Int)
1313
case double(Double)

samples/client/petstore/swift6/alamofireLibrary/Sources/PetstoreClient/Infrastructure/Models.swift

+2
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ public enum NullEncodable<Wrapped: Hashable>: Hashable {
4444
case encodeValue(Wrapped)
4545
}
4646

47+
extension NullEncodable: Sendable where Wrapped: Sendable {}
48+
4749
extension NullEncodable: Codable where Wrapped: Codable {
4850
public init(from decoder: Decoder) throws {
4951
let container = try decoder.singleValueContainer()

samples/client/petstore/swift6/alamofireLibrary/Sources/PetstoreClient/Infrastructure/OpenAPIDateWithoutTime.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import Foundation
1515
/// an appropriate padding in order to transform to GMT+0 which is the assumed timezone in ISO 8601.
1616
/// When decoding, GMT+0 can be assumed (again: ISO8601) so there is no padding necessary and wrappedDate
1717
/// can be used safely.
18-
public struct OpenAPIDateWithoutTime: Codable, Hashable, Equatable {
18+
public struct OpenAPIDateWithoutTime: Sendable, Codable, Hashable, Equatable {
1919
public let wrappedDate: Date
2020
public let timezone: TimeZone
2121

samples/client/petstore/swift6/alamofireLibrary/Sources/PetstoreClient/Infrastructure/SynchronizedDictionary.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
import Foundation
88

9-
internal struct SynchronizedDictionary<K: Hashable, V> {
9+
internal struct SynchronizedDictionary<K: Hashable, V> : @unchecked Sendable {
1010

1111
private var dictionary = [K: V]()
1212
private let lock = NSRecursiveLock()

samples/client/petstore/swift6/alamofireLibrary/Sources/PetstoreClient/Models/AdditionalPropertiesClass.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import Foundation
99

10-
public struct AdditionalPropertiesClass: Codable, JSONEncodable, Hashable {
10+
public struct AdditionalPropertiesClass: Sendable, Codable, JSONEncodable, Hashable {
1111

1212
public var mapString: [String: String]?
1313
public var mapMapString: [String: [String: String]]?

samples/client/petstore/swift6/alamofireLibrary/Sources/PetstoreClient/Models/Animal.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import Foundation
99

10-
public struct Animal: Codable, JSONEncodable, Hashable {
10+
public struct Animal: Sendable, Codable, JSONEncodable, Hashable {
1111

1212
public var className: String
1313
public var color: String? = "red"

samples/client/petstore/swift6/alamofireLibrary/Sources/PetstoreClient/Models/ApiResponse.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import Foundation
99

10-
public struct ApiResponse: Codable, JSONEncodable, Hashable {
10+
public struct ApiResponse: Sendable, Codable, JSONEncodable, Hashable {
1111

1212
public var code: Int?
1313
public var type: String?

samples/client/petstore/swift6/alamofireLibrary/Sources/PetstoreClient/Models/ArrayOfArrayOfNumberOnly.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import Foundation
99

10-
public struct ArrayOfArrayOfNumberOnly: Codable, JSONEncodable, Hashable {
10+
public struct ArrayOfArrayOfNumberOnly: Sendable, Codable, JSONEncodable, Hashable {
1111

1212
public var arrayArrayNumber: [[Double]]?
1313

samples/client/petstore/swift6/alamofireLibrary/Sources/PetstoreClient/Models/ArrayOfNumberOnly.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import Foundation
99

10-
public struct ArrayOfNumberOnly: Codable, JSONEncodable, Hashable {
10+
public struct ArrayOfNumberOnly: Sendable, Codable, JSONEncodable, Hashable {
1111

1212
public var arrayNumber: [Double]?
1313

samples/client/petstore/swift6/alamofireLibrary/Sources/PetstoreClient/Models/ArrayTest.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import Foundation
99

10-
public struct ArrayTest: Codable, JSONEncodable, Hashable {
10+
public struct ArrayTest: Sendable, Codable, JSONEncodable, Hashable {
1111

1212
public var arrayOfString: [String]?
1313
public var arrayArrayOfInteger: [[Int64]]?

samples/client/petstore/swift6/alamofireLibrary/Sources/PetstoreClient/Models/Capitalization.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import Foundation
99

10-
public struct Capitalization: Codable, JSONEncodable, Hashable {
10+
public struct Capitalization: Sendable, Codable, JSONEncodable, Hashable {
1111

1212
public var smallCamel: String?
1313
public var capitalCamel: String?

samples/client/petstore/swift6/alamofireLibrary/Sources/PetstoreClient/Models/Cat.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import Foundation
99

10-
public struct Cat: Codable, JSONEncodable, Hashable {
10+
public struct Cat: Sendable, Codable, JSONEncodable, Hashable {
1111

1212
public var className: String
1313
public var color: String? = "red"

samples/client/petstore/swift6/alamofireLibrary/Sources/PetstoreClient/Models/Category.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import Foundation
99

10-
public struct Category: Codable, JSONEncodable, Hashable {
10+
public struct Category: Sendable, Codable, JSONEncodable, Hashable {
1111

1212
public var id: Int64?
1313
public var name: String? = "default-name"

samples/client/petstore/swift6/alamofireLibrary/Sources/PetstoreClient/Models/ClassModel.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import Foundation
99

1010
/** Model for testing model with \&quot;_class\&quot; property */
11-
public struct ClassModel: Codable, JSONEncodable, Hashable {
11+
public struct ClassModel: Sendable, Codable, JSONEncodable, Hashable {
1212

1313
public var _class: String?
1414

samples/client/petstore/swift6/alamofireLibrary/Sources/PetstoreClient/Models/Client.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import Foundation
99

10-
public struct Client: Codable, JSONEncodable, Hashable {
10+
public struct Client: Sendable, Codable, JSONEncodable, Hashable {
1111

1212
public var client: String?
1313

samples/client/petstore/swift6/alamofireLibrary/Sources/PetstoreClient/Models/Dog.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import Foundation
99

10-
public struct Dog: Codable, JSONEncodable, Hashable {
10+
public struct Dog: Sendable, Codable, JSONEncodable, Hashable {
1111

1212
public var className: String
1313
public var color: String? = "red"

samples/client/petstore/swift6/alamofireLibrary/Sources/PetstoreClient/Models/EnumArrays.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77

88
import Foundation
99

10-
public struct EnumArrays: Codable, JSONEncodable, Hashable {
10+
public struct EnumArrays: Sendable, Codable, JSONEncodable, Hashable {
1111

12-
public enum JustSymbol: String, Codable, CaseIterable {
12+
public enum JustSymbol: String, Sendable, Codable, CaseIterable {
1313
case greaterThanOrEqualTo = ">="
1414
case dollar = "$"
1515
}
16-
public enum ArrayEnum: String, Codable, CaseIterable {
16+
public enum ArrayEnum: String, Sendable, Codable, CaseIterable {
1717
case fish = "fish"
1818
case crab = "crab"
1919
}

samples/client/petstore/swift6/alamofireLibrary/Sources/PetstoreClient/Models/EnumClass.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import Foundation
99

10-
public enum EnumClass: String, Codable, CaseIterable {
10+
public enum EnumClass: String, Sendable, Codable, CaseIterable {
1111
case abc = "_abc"
1212
case efg = "-efg"
1313
case xyz = "(xyz)"

samples/client/petstore/swift6/alamofireLibrary/Sources/PetstoreClient/Models/EnumTest.swift

+5-5
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,23 @@
77

88
import Foundation
99

10-
public struct EnumTest: Codable, JSONEncodable, Hashable {
10+
public struct EnumTest: Sendable, Codable, JSONEncodable, Hashable {
1111

12-
public enum EnumString: String, Codable, CaseIterable {
12+
public enum EnumString: String, Sendable, Codable, CaseIterable {
1313
case upper = "UPPER"
1414
case lower = "lower"
1515
case empty = ""
1616
}
17-
public enum EnumStringRequired: String, Codable, CaseIterable {
17+
public enum EnumStringRequired: String, Sendable, Codable, CaseIterable {
1818
case upper = "UPPER"
1919
case lower = "lower"
2020
case empty = ""
2121
}
22-
public enum EnumInteger: Int, Codable, CaseIterable {
22+
public enum EnumInteger: Int, Sendable, Codable, CaseIterable {
2323
case _1 = 1
2424
case number1 = -1
2525
}
26-
public enum EnumNumber: Double, Codable, CaseIterable {
26+
public enum EnumNumber: Double, Sendable, Codable, CaseIterable {
2727
case _11 = 1.1
2828
case number12 = -1.2
2929
}

samples/client/petstore/swift6/alamofireLibrary/Sources/PetstoreClient/Models/File.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import Foundation
99

1010
/** Must be named &#x60;File&#x60; for test. */
11-
public struct File: Codable, JSONEncodable, Hashable {
11+
public struct File: Sendable, Codable, JSONEncodable, Hashable {
1212

1313
/** Test capitalization */
1414
public var sourceURI: String?

samples/client/petstore/swift6/alamofireLibrary/Sources/PetstoreClient/Models/FileSchemaTestClass.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import Foundation
99

10-
public struct FileSchemaTestClass: Codable, JSONEncodable, Hashable {
10+
public struct FileSchemaTestClass: Sendable, Codable, JSONEncodable, Hashable {
1111

1212
public var file: File?
1313
public var files: [File]?

samples/client/petstore/swift6/alamofireLibrary/Sources/PetstoreClient/Models/FormatTest.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import Foundation
99

10-
public struct FormatTest: Codable, JSONEncodable, Hashable {
10+
public struct FormatTest: Sendable, Codable, JSONEncodable, Hashable {
1111

1212
static let integerRule = NumericRule<Int>(minimum: 10, exclusiveMinimum: false, maximum: 100, exclusiveMaximum: false, multipleOf: nil)
1313
static let int32Rule = NumericRule<Int>(minimum: 20, exclusiveMinimum: false, maximum: 200, exclusiveMaximum: false, multipleOf: nil)

samples/client/petstore/swift6/alamofireLibrary/Sources/PetstoreClient/Models/HasOnlyReadOnly.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import Foundation
99

10-
public struct HasOnlyReadOnly: Codable, JSONEncodable, Hashable {
10+
public struct HasOnlyReadOnly: Sendable, Codable, JSONEncodable, Hashable {
1111

1212
public var bar: String?
1313
public var foo: String?

samples/client/petstore/swift6/alamofireLibrary/Sources/PetstoreClient/Models/List.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import Foundation
99

10-
public struct List: Codable, JSONEncodable, Hashable {
10+
public struct List: Sendable, Codable, JSONEncodable, Hashable {
1111

1212
public var _123list: String?
1313

samples/client/petstore/swift6/alamofireLibrary/Sources/PetstoreClient/Models/MapTest.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77

88
import Foundation
99

10-
public struct MapTest: Codable, JSONEncodable, Hashable {
10+
public struct MapTest: Sendable, Codable, JSONEncodable, Hashable {
1111

12-
public enum MapOfEnumString: String, Codable, CaseIterable {
12+
public enum MapOfEnumString: String, Sendable, Codable, CaseIterable {
1313
case upper = "UPPER"
1414
case lower = "lower"
1515
}

samples/client/petstore/swift6/alamofireLibrary/Sources/PetstoreClient/Models/MixedPropertiesAndAdditionalPropertiesClass.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import Foundation
99

10-
public struct MixedPropertiesAndAdditionalPropertiesClass: Codable, JSONEncodable, Hashable {
10+
public struct MixedPropertiesAndAdditionalPropertiesClass: Sendable, Codable, JSONEncodable, Hashable {
1111

1212
public var uuid: UUID?
1313
public var dateTime: Date?

samples/client/petstore/swift6/alamofireLibrary/Sources/PetstoreClient/Models/Model200Response.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import Foundation
99

1010
/** Model for testing model name starting with number */
11-
public struct Model200Response: Codable, JSONEncodable, Hashable {
11+
public struct Model200Response: Sendable, Codable, JSONEncodable, Hashable {
1212

1313
public var name: Int?
1414
public var _class: String?

samples/client/petstore/swift6/alamofireLibrary/Sources/PetstoreClient/Models/Name.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import Foundation
99

1010
/** Model for testing model name same as property name */
11-
public struct Name: Codable, JSONEncodable, Hashable {
11+
public struct Name: Sendable, Codable, JSONEncodable, Hashable {
1212

1313
public var name: Int
1414
public var snakeCase: NullEncodable<Int> = .encodeValue(11033)

samples/client/petstore/swift6/alamofireLibrary/Sources/PetstoreClient/Models/NumberOnly.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import Foundation
99

10-
public struct NumberOnly: Codable, JSONEncodable, Hashable {
10+
public struct NumberOnly: Sendable, Codable, JSONEncodable, Hashable {
1111

1212
public var justNumber: Double?
1313

samples/client/petstore/swift6/alamofireLibrary/Sources/PetstoreClient/Models/Order.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77

88
import Foundation
99

10-
public struct Order: Codable, JSONEncodable, Hashable {
10+
public struct Order: Sendable, Codable, JSONEncodable, Hashable {
1111

12-
public enum Status: String, Codable, CaseIterable {
12+
public enum Status: String, Sendable, Codable, CaseIterable {
1313
case placed = "placed"
1414
case approved = "approved"
1515
case delivered = "delivered"

samples/client/petstore/swift6/alamofireLibrary/Sources/PetstoreClient/Models/OuterComposite.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import Foundation
99

10-
public struct OuterComposite: Codable, JSONEncodable, Hashable {
10+
public struct OuterComposite: Sendable, Codable, JSONEncodable, Hashable {
1111

1212
public var myNumber: Double?
1313
public var myString: String?

samples/client/petstore/swift6/alamofireLibrary/Sources/PetstoreClient/Models/OuterEnum.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import Foundation
99

10-
public enum OuterEnum: String, Codable, CaseIterable {
10+
public enum OuterEnum: String, Sendable, Codable, CaseIterable {
1111
case placed = "placed"
1212
case approved = "approved"
1313
case delivered = "delivered"

samples/client/petstore/swift6/alamofireLibrary/Sources/PetstoreClient/Models/Pet.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77

88
import Foundation
99

10-
public struct Pet: Codable, JSONEncodable, Hashable {
10+
public struct Pet: Sendable, Codable, JSONEncodable, Hashable {
1111

12-
public enum Status: String, Codable, CaseIterable {
12+
public enum Status: String, Sendable, Codable, CaseIterable {
1313
case available = "available"
1414
case pending = "pending"
1515
case sold = "sold"

0 commit comments

Comments
 (0)