forked from loafle/openapi-generator-original
[swift5][client] add support for async/await in iOS 13 and above (#11109)
This commit is contained in:
parent
d5979d3180
commit
5416e92d19
@ -197,7 +197,7 @@ extension {{projectName}}API {
|
||||
{{#isDeprecated}}
|
||||
@available(*, deprecated, message: "This operation is deprecated.")
|
||||
{{/isDeprecated}}
|
||||
@available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *)
|
||||
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
|
||||
{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class func {{operationId}}({{#allParams}}{{paramName}}: {{#isEnum}}{{#isContainer}}[{{enumName}}_{{operationId}}]{{/isContainer}}{{^isContainer}}{{enumName}}_{{operationId}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}? = nil{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#hasParams}}, {{/hasParams}}apiResponseQueue: DispatchQueue = {{projectName}}API.apiResponseQueue) async throws{{#returnType}} -> {{{returnType}}}{{/returnType}} {
|
||||
var requestTask: RequestTask?
|
||||
return try await withTaskCancellationHandler {
|
||||
|
@ -19,7 +19,7 @@ open class AnotherFakeAPI {
|
||||
- parameter apiResponseQueue: The queue on which api response is dispatched.
|
||||
- returns: Client
|
||||
*/
|
||||
@available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *)
|
||||
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
|
||||
open class func call123testSpecialTags(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) async throws -> Client {
|
||||
var requestTask: RequestTask?
|
||||
return try await withTaskCancellationHandler {
|
||||
|
@ -18,7 +18,7 @@ open class FakeAPI {
|
||||
- parameter apiResponseQueue: The queue on which api response is dispatched.
|
||||
- returns: Bool
|
||||
*/
|
||||
@available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *)
|
||||
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
|
||||
open class func fakeOuterBooleanSerialize(body: Bool? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) async throws -> Bool {
|
||||
var requestTask: RequestTask?
|
||||
return try await withTaskCancellationHandler {
|
||||
@ -73,7 +73,7 @@ open class FakeAPI {
|
||||
- parameter apiResponseQueue: The queue on which api response is dispatched.
|
||||
- returns: OuterComposite
|
||||
*/
|
||||
@available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *)
|
||||
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
|
||||
open class func fakeOuterCompositeSerialize(body: OuterComposite? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) async throws -> OuterComposite {
|
||||
var requestTask: RequestTask?
|
||||
return try await withTaskCancellationHandler {
|
||||
@ -128,7 +128,7 @@ open class FakeAPI {
|
||||
- parameter apiResponseQueue: The queue on which api response is dispatched.
|
||||
- returns: Double
|
||||
*/
|
||||
@available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *)
|
||||
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
|
||||
open class func fakeOuterNumberSerialize(body: Double? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) async throws -> Double {
|
||||
var requestTask: RequestTask?
|
||||
return try await withTaskCancellationHandler {
|
||||
@ -183,7 +183,7 @@ open class FakeAPI {
|
||||
- parameter apiResponseQueue: The queue on which api response is dispatched.
|
||||
- returns: String
|
||||
*/
|
||||
@available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *)
|
||||
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
|
||||
open class func fakeOuterStringSerialize(body: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) async throws -> String {
|
||||
var requestTask: RequestTask?
|
||||
return try await withTaskCancellationHandler {
|
||||
@ -238,7 +238,7 @@ open class FakeAPI {
|
||||
- parameter apiResponseQueue: The queue on which api response is dispatched.
|
||||
- returns: Void
|
||||
*/
|
||||
@available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *)
|
||||
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
|
||||
open class func testBodyWithFileSchema(body: FileSchemaTestClass, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) async throws {
|
||||
var requestTask: RequestTask?
|
||||
return try await withTaskCancellationHandler {
|
||||
@ -294,7 +294,7 @@ open class FakeAPI {
|
||||
- parameter apiResponseQueue: The queue on which api response is dispatched.
|
||||
- returns: Void
|
||||
*/
|
||||
@available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *)
|
||||
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
|
||||
open class func testBodyWithQueryParams(query: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) async throws {
|
||||
var requestTask: RequestTask?
|
||||
return try await withTaskCancellationHandler {
|
||||
@ -353,7 +353,7 @@ open class FakeAPI {
|
||||
- parameter apiResponseQueue: The queue on which api response is dispatched.
|
||||
- returns: Client
|
||||
*/
|
||||
@available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *)
|
||||
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
|
||||
open class func testClientModel(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) async throws -> Client {
|
||||
var requestTask: RequestTask?
|
||||
return try await withTaskCancellationHandler {
|
||||
@ -423,7 +423,7 @@ open class FakeAPI {
|
||||
- parameter apiResponseQueue: The queue on which api response is dispatched.
|
||||
- returns: Void
|
||||
*/
|
||||
@available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *)
|
||||
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
|
||||
open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) async throws {
|
||||
var requestTask: RequestTask?
|
||||
return try await withTaskCancellationHandler {
|
||||
@ -588,7 +588,7 @@ open class FakeAPI {
|
||||
- parameter apiResponseQueue: The queue on which api response is dispatched.
|
||||
- returns: Void
|
||||
*/
|
||||
@available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *)
|
||||
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
|
||||
open class func testEnumParameters(enumHeaderStringArray: [EnumHeaderStringArray_testEnumParameters]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [EnumQueryStringArray_testEnumParameters]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [EnumFormStringArray_testEnumParameters]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) async throws {
|
||||
var requestTask: RequestTask?
|
||||
return try await withTaskCancellationHandler {
|
||||
@ -671,7 +671,7 @@ open class FakeAPI {
|
||||
- parameter apiResponseQueue: The queue on which api response is dispatched.
|
||||
- returns: Void
|
||||
*/
|
||||
@available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *)
|
||||
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
|
||||
open class func testGroupParameters(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) async throws {
|
||||
var requestTask: RequestTask?
|
||||
return try await withTaskCancellationHandler {
|
||||
@ -740,7 +740,7 @@ open class FakeAPI {
|
||||
- parameter apiResponseQueue: The queue on which api response is dispatched.
|
||||
- returns: Void
|
||||
*/
|
||||
@available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *)
|
||||
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
|
||||
open class func testInlineAdditionalProperties(param: [String: String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) async throws {
|
||||
var requestTask: RequestTask?
|
||||
return try await withTaskCancellationHandler {
|
||||
@ -797,7 +797,7 @@ open class FakeAPI {
|
||||
- parameter apiResponseQueue: The queue on which api response is dispatched.
|
||||
- returns: Void
|
||||
*/
|
||||
@available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *)
|
||||
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
|
||||
open class func testJsonFormData(param: String, param2: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) async throws {
|
||||
var requestTask: RequestTask?
|
||||
return try await withTaskCancellationHandler {
|
||||
|
@ -19,7 +19,7 @@ open class FakeClassnameTags123API {
|
||||
- parameter apiResponseQueue: The queue on which api response is dispatched.
|
||||
- returns: Client
|
||||
*/
|
||||
@available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *)
|
||||
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
|
||||
open class func testClassname(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) async throws -> Client {
|
||||
var requestTask: RequestTask?
|
||||
return try await withTaskCancellationHandler {
|
||||
|
@ -19,7 +19,7 @@ open class PetAPI {
|
||||
- parameter apiResponseQueue: The queue on which api response is dispatched.
|
||||
- returns: Void
|
||||
*/
|
||||
@available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *)
|
||||
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
|
||||
open class func addPet(body: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) async throws {
|
||||
var requestTask: RequestTask?
|
||||
return try await withTaskCancellationHandler {
|
||||
@ -79,7 +79,7 @@ open class PetAPI {
|
||||
- parameter apiResponseQueue: The queue on which api response is dispatched.
|
||||
- returns: Void
|
||||
*/
|
||||
@available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *)
|
||||
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
|
||||
open class func deletePet(petId: Int64, apiKey: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) async throws {
|
||||
var requestTask: RequestTask?
|
||||
return try await withTaskCancellationHandler {
|
||||
@ -151,7 +151,7 @@ open class PetAPI {
|
||||
- parameter apiResponseQueue: The queue on which api response is dispatched.
|
||||
- returns: [Pet]
|
||||
*/
|
||||
@available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *)
|
||||
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
|
||||
open class func findPetsByStatus(status: [Status_findPetsByStatus], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) async throws -> [Pet] {
|
||||
var requestTask: RequestTask?
|
||||
return try await withTaskCancellationHandler {
|
||||
@ -215,7 +215,7 @@ open class PetAPI {
|
||||
- returns: [Pet]
|
||||
*/
|
||||
@available(*, deprecated, message: "This operation is deprecated.")
|
||||
@available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *)
|
||||
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
|
||||
open class func findPetsByTags(tags: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) async throws -> [Pet] {
|
||||
var requestTask: RequestTask?
|
||||
return try await withTaskCancellationHandler {
|
||||
@ -279,7 +279,7 @@ open class PetAPI {
|
||||
- parameter apiResponseQueue: The queue on which api response is dispatched.
|
||||
- returns: Pet
|
||||
*/
|
||||
@available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *)
|
||||
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
|
||||
open class func getPetById(petId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) async throws -> Pet {
|
||||
var requestTask: RequestTask?
|
||||
return try await withTaskCancellationHandler {
|
||||
@ -342,7 +342,7 @@ open class PetAPI {
|
||||
- parameter apiResponseQueue: The queue on which api response is dispatched.
|
||||
- returns: Void
|
||||
*/
|
||||
@available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *)
|
||||
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
|
||||
open class func updatePet(body: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) async throws {
|
||||
var requestTask: RequestTask?
|
||||
return try await withTaskCancellationHandler {
|
||||
@ -403,7 +403,7 @@ open class PetAPI {
|
||||
- parameter apiResponseQueue: The queue on which api response is dispatched.
|
||||
- returns: Void
|
||||
*/
|
||||
@available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *)
|
||||
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
|
||||
open class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) async throws {
|
||||
var requestTask: RequestTask?
|
||||
return try await withTaskCancellationHandler {
|
||||
@ -475,7 +475,7 @@ open class PetAPI {
|
||||
- parameter apiResponseQueue: The queue on which api response is dispatched.
|
||||
- returns: ApiResponse
|
||||
*/
|
||||
@available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *)
|
||||
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
|
||||
open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) async throws -> ApiResponse {
|
||||
var requestTask: RequestTask?
|
||||
return try await withTaskCancellationHandler {
|
||||
@ -547,7 +547,7 @@ open class PetAPI {
|
||||
- parameter apiResponseQueue: The queue on which api response is dispatched.
|
||||
- returns: ApiResponse
|
||||
*/
|
||||
@available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *)
|
||||
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
|
||||
open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) async throws -> ApiResponse {
|
||||
var requestTask: RequestTask?
|
||||
return try await withTaskCancellationHandler {
|
||||
|
@ -19,7 +19,7 @@ open class StoreAPI {
|
||||
- parameter apiResponseQueue: The queue on which api response is dispatched.
|
||||
- returns: Void
|
||||
*/
|
||||
@available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *)
|
||||
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
|
||||
open class func deleteOrder(orderId: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) async throws {
|
||||
var requestTask: RequestTask?
|
||||
return try await withTaskCancellationHandler {
|
||||
@ -78,7 +78,7 @@ open class StoreAPI {
|
||||
- parameter apiResponseQueue: The queue on which api response is dispatched.
|
||||
- returns: [String: Int]
|
||||
*/
|
||||
@available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *)
|
||||
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
|
||||
open class func getInventory(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) async throws -> [String: Int] {
|
||||
var requestTask: RequestTask?
|
||||
return try await withTaskCancellationHandler {
|
||||
@ -137,7 +137,7 @@ open class StoreAPI {
|
||||
- parameter apiResponseQueue: The queue on which api response is dispatched.
|
||||
- returns: Order
|
||||
*/
|
||||
@available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *)
|
||||
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
|
||||
open class func getOrderById(orderId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) async throws -> Order {
|
||||
var requestTask: RequestTask?
|
||||
return try await withTaskCancellationHandler {
|
||||
@ -197,7 +197,7 @@ open class StoreAPI {
|
||||
- parameter apiResponseQueue: The queue on which api response is dispatched.
|
||||
- returns: Order
|
||||
*/
|
||||
@available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *)
|
||||
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
|
||||
open class func placeOrder(body: Order, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) async throws -> Order {
|
||||
var requestTask: RequestTask?
|
||||
return try await withTaskCancellationHandler {
|
||||
|
@ -19,7 +19,7 @@ open class UserAPI {
|
||||
- parameter apiResponseQueue: The queue on which api response is dispatched.
|
||||
- returns: Void
|
||||
*/
|
||||
@available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *)
|
||||
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
|
||||
open class func createUser(body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) async throws {
|
||||
var requestTask: RequestTask?
|
||||
return try await withTaskCancellationHandler {
|
||||
@ -76,7 +76,7 @@ open class UserAPI {
|
||||
- parameter apiResponseQueue: The queue on which api response is dispatched.
|
||||
- returns: Void
|
||||
*/
|
||||
@available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *)
|
||||
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
|
||||
open class func createUsersWithArrayInput(body: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) async throws {
|
||||
var requestTask: RequestTask?
|
||||
return try await withTaskCancellationHandler {
|
||||
@ -132,7 +132,7 @@ open class UserAPI {
|
||||
- parameter apiResponseQueue: The queue on which api response is dispatched.
|
||||
- returns: Void
|
||||
*/
|
||||
@available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *)
|
||||
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
|
||||
open class func createUsersWithListInput(body: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) async throws {
|
||||
var requestTask: RequestTask?
|
||||
return try await withTaskCancellationHandler {
|
||||
@ -188,7 +188,7 @@ open class UserAPI {
|
||||
- parameter apiResponseQueue: The queue on which api response is dispatched.
|
||||
- returns: Void
|
||||
*/
|
||||
@available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *)
|
||||
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
|
||||
open class func deleteUser(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) async throws {
|
||||
var requestTask: RequestTask?
|
||||
return try await withTaskCancellationHandler {
|
||||
@ -248,7 +248,7 @@ open class UserAPI {
|
||||
- parameter apiResponseQueue: The queue on which api response is dispatched.
|
||||
- returns: User
|
||||
*/
|
||||
@available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *)
|
||||
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
|
||||
open class func getUserByName(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) async throws -> User {
|
||||
var requestTask: RequestTask?
|
||||
return try await withTaskCancellationHandler {
|
||||
@ -308,7 +308,7 @@ open class UserAPI {
|
||||
- parameter apiResponseQueue: The queue on which api response is dispatched.
|
||||
- returns: String
|
||||
*/
|
||||
@available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *)
|
||||
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
|
||||
open class func loginUser(username: String, password: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) async throws -> String {
|
||||
var requestTask: RequestTask?
|
||||
return try await withTaskCancellationHandler {
|
||||
@ -369,7 +369,7 @@ open class UserAPI {
|
||||
- parameter apiResponseQueue: The queue on which api response is dispatched.
|
||||
- returns: Void
|
||||
*/
|
||||
@available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *)
|
||||
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
|
||||
open class func logoutUser(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) async throws {
|
||||
var requestTask: RequestTask?
|
||||
return try await withTaskCancellationHandler {
|
||||
@ -425,7 +425,7 @@ open class UserAPI {
|
||||
- parameter apiResponseQueue: The queue on which api response is dispatched.
|
||||
- returns: Void
|
||||
*/
|
||||
@available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *)
|
||||
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
|
||||
open class func updateUser(username: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) async throws {
|
||||
var requestTask: RequestTask?
|
||||
return try await withTaskCancellationHandler {
|
||||
|
Loading…
x
Reference in New Issue
Block a user