Skip to content

Commit 4c1257a

Browse files
authored
[Swift][client] add identifier to each request (#20890)
* [Swift][client] add identifier to each request * [Swift][client] add identifier to each request * [Swift][client] CI first build the projects then run the unit tests
1 parent 31c1a86 commit 4c1257a

File tree

15 files changed

+26
-27
lines changed
  • modules/openapi-generator/src/main/resources/swift6
  • samples/client/petstore/swift6
    • alamofireLibrary/Sources/PetstoreClient/Infrastructure
    • apiNonStaticMethod/Sources/PetstoreClient/Infrastructure
    • asyncAwaitLibrary/Sources/PetstoreClient/Infrastructure
    • combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure
    • combineLibrary/Sources/CombineLibrary/Infrastructure
    • default/Sources/PetstoreClient/Infrastructure
    • objcCompatible/Sources/PetstoreClient/Infrastructure
    • oneOf/PetstoreClient/Classes/OpenAPIs/Infrastructure
    • promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure
    • resultLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure
    • rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure
    • urlsessionLibrary/Sources/PetstoreClient/Infrastructure
    • validation/PetstoreClient/Classes/OpenAPIs/Infrastructure

15 files changed

+26
-27
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ import Alamofire{{/useAlamofire}}
8282
{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static let shared = {{projectName}}APIConfiguration()
8383
}{{^useVapor}}
8484

85-
{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class RequestBuilder<T>: @unchecked Sendable {
85+
{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class RequestBuilder<T>: @unchecked Sendable, Identifiable {
8686
{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} var credential: URLCredential?
8787
{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} var headers: [String: String]
8888
{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} let parameters: [String: any Sendable]?

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ open class PetstoreClientAPIConfiguration: @unchecked Sendable {
6161
public static let shared = PetstoreClientAPIConfiguration()
6262
}
6363

64-
open class RequestBuilder<T>: @unchecked Sendable {
64+
open class RequestBuilder<T>: @unchecked Sendable, Identifiable {
6565
public var credential: URLCredential?
6666
public var headers: [String: String]
6767
public let parameters: [String: any Sendable]?

samples/client/petstore/swift6/apiNonStaticMethod/Sources/PetstoreClient/Infrastructure/APIs.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ open class PetstoreClientAPIConfiguration: @unchecked Sendable {
6161
public static let shared = PetstoreClientAPIConfiguration()
6262
}
6363

64-
open class RequestBuilder<T>: @unchecked Sendable {
64+
open class RequestBuilder<T>: @unchecked Sendable, Identifiable {
6565
public var credential: URLCredential?
6666
public var headers: [String: String]
6767
public let parameters: [String: any Sendable]?

samples/client/petstore/swift6/asyncAwaitLibrary/Sources/PetstoreClient/Infrastructure/APIs.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ open class PetstoreClientAPIConfiguration: @unchecked Sendable {
4747
public static let shared = PetstoreClientAPIConfiguration()
4848
}
4949

50-
open class RequestBuilder<T>: @unchecked Sendable {
50+
open class RequestBuilder<T>: @unchecked Sendable, Identifiable {
5151
public var credential: URLCredential?
5252
public var headers: [String: String]
5353
public let parameters: [String: any Sendable]?

samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/APIs.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ open class PetstoreClientAPIConfiguration: @unchecked Sendable {
4747
public static let shared = PetstoreClientAPIConfiguration()
4848
}
4949

50-
open class RequestBuilder<T>: @unchecked Sendable {
50+
open class RequestBuilder<T>: @unchecked Sendable, Identifiable {
5151
public var credential: URLCredential?
5252
public var headers: [String: String]
5353
public let parameters: [String: any Sendable]?

samples/client/petstore/swift6/combineLibrary/Sources/CombineLibrary/Infrastructure/APIs.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ open class PetstoreClientAPIConfiguration: @unchecked Sendable {
4747
public static let shared = PetstoreClientAPIConfiguration()
4848
}
4949

50-
open class RequestBuilder<T>: @unchecked Sendable {
50+
open class RequestBuilder<T>: @unchecked Sendable, Identifiable {
5151
public var credential: URLCredential?
5252
public var headers: [String: String]
5353
public let parameters: [String: any Sendable]?

samples/client/petstore/swift6/default/Sources/PetstoreClient/Infrastructure/APIs.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ open class PetstoreClientAPIConfiguration: @unchecked Sendable {
4747
public static let shared = PetstoreClientAPIConfiguration()
4848
}
4949

50-
open class RequestBuilder<T>: @unchecked Sendable {
50+
open class RequestBuilder<T>: @unchecked Sendable, Identifiable {
5151
public var credential: URLCredential?
5252
public var headers: [String: String]
5353
public let parameters: [String: any Sendable]?

samples/client/petstore/swift6/objcCompatible/Sources/PetstoreClient/Infrastructure/APIs.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ open class PetstoreClientAPIConfiguration: @unchecked Sendable {
4747
public static let shared = PetstoreClientAPIConfiguration()
4848
}
4949

50-
open class RequestBuilder<T>: @unchecked Sendable {
50+
open class RequestBuilder<T>: @unchecked Sendable, Identifiable {
5151
public var credential: URLCredential?
5252
public var headers: [String: String]
5353
public let parameters: [String: any Sendable]?

samples/client/petstore/swift6/oneOf/PetstoreClient/Classes/OpenAPIs/Infrastructure/APIs.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ open class PetstoreClientAPIConfiguration: @unchecked Sendable {
4747
public static let shared = PetstoreClientAPIConfiguration()
4848
}
4949

50-
open class RequestBuilder<T>: @unchecked Sendable {
50+
open class RequestBuilder<T>: @unchecked Sendable, Identifiable {
5151
public var credential: URLCredential?
5252
public var headers: [String: String]
5353
public let parameters: [String: any Sendable]?

samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/APIs.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ open class PetstoreClientAPIConfiguration: @unchecked Sendable {
4747
public static let shared = PetstoreClientAPIConfiguration()
4848
}
4949

50-
open class RequestBuilder<T>: @unchecked Sendable {
50+
open class RequestBuilder<T>: @unchecked Sendable, Identifiable {
5151
public var credential: URLCredential?
5252
public var headers: [String: String]
5353
public let parameters: [String: any Sendable]?

0 commit comments

Comments
 (0)