From ddd11abb87211f7af5c7e90ef679991782faf7fb Mon Sep 17 00:00:00 2001 From: Peter Leibiger Date: Tue, 15 Dec 2020 17:52:47 +0100 Subject: [PATCH] [dart][dart-dio] Correctly type responses and futures (#8195) * don't rely on implicit dynamics * this is a requirement for NNBD * add space between return type and some method names --- .../src/main/resources/dart-dio/api.mustache | 2 +- .../src/main/resources/dart2/api.mustache | 4 +-- .../petstore_client_lib/lib/api/pet_api.dart | 16 ++++----- .../lib/api/store_api.dart | 8 ++--- .../petstore_client_lib/lib/api/user_api.dart | 16 ++++----- .../petstore_client_lib/lib/api/pet_api.dart | 16 ++++----- .../lib/api/store_api.dart | 4 +-- .../petstore_client_lib/lib/api/user_api.dart | 24 ++++++------- .../petstore_client_lib/lib/api/pet_api.dart | 16 ++++----- .../lib/api/store_api.dart | 8 ++--- .../petstore_client_lib/lib/api/user_api.dart | 16 ++++----- .../lib/api/another_fake_api.dart | 2 +- .../lib/api/default_api.dart | 2 +- .../lib/api/fake_api.dart | 30 ++++++++-------- .../lib/api/fake_classname_tags123_api.dart | 2 +- .../lib/api/pet_api.dart | 18 +++++----- .../lib/api/store_api.dart | 8 ++--- .../lib/api/user_api.dart | 16 ++++----- .../petstore_client_lib/lib/api/pet_api.dart | 8 ++--- .../lib/api/store_api.dart | 4 +-- .../petstore_client_lib/lib/api/user_api.dart | 24 ++++++------- .../lib/api/fake_api.dart | 36 +++++++++---------- .../lib/api/pet_api.dart | 16 ++++----- .../lib/api/store_api.dart | 4 +-- .../lib/api/user_api.dart | 24 ++++++------- 25 files changed, 162 insertions(+), 162 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/dart-dio/api.mustache b/modules/openapi-generator/src/main/resources/dart-dio/api.mustache index 1f2a044adc9..a7618c5f72e 100644 --- a/modules/openapi-generator/src/main/resources/dart-dio/api.mustache +++ b/modules/openapi-generator/src/main/resources/dart-dio/api.mustache @@ -19,7 +19,7 @@ class {{classname}} { /// {{{summary}}} /// /// {{{notes}}} - Future{{/returnType}}>{{nickname}}({{^hasRequiredParams}}{ {{/hasRequiredParams}}{{#requiredParams}} + Future> {{nickname}}({{^hasRequiredParams}}{ {{/hasRequiredParams}}{{#requiredParams}} {{{dataType}}} {{paramName}},{{#-last}} { {{/-last}}{{/requiredParams}}{{#optionalParams}} {{{dataType}}} {{paramName}},{{/optionalParams}} CancelToken cancelToken, diff --git a/modules/openapi-generator/src/main/resources/dart2/api.mustache b/modules/openapi-generator/src/main/resources/dart2/api.mustache index 3ec423f2807..716118fa428 100644 --- a/modules/openapi-generator/src/main/resources/dart2/api.mustache +++ b/modules/openapi-generator/src/main/resources/dart2/api.mustache @@ -49,7 +49,7 @@ class {{{classname}}} { /// {{/-last}} {{/allParams}} - {{#returnType}}Future {{/returnType}}{{^returnType}}Future {{/returnType}}{{{nickname}}}WithHttpInfo({{#allParams}}{{#required}}{{{dataType}}} {{{paramName}}}{{^-last}}, {{/-last}}{{/required}}{{/allParams}}{{#hasOptionalParams}}{ {{#allParams}}{{^required}}{{{dataType}}} {{{paramName}}}{{^-last}}, {{/-last}}{{/required}}{{/allParams}} }{{/hasOptionalParams}}) async { + Future {{{nickname}}}WithHttpInfo({{#allParams}}{{#required}}{{{dataType}}} {{{paramName}}}{{^-last}}, {{/-last}}{{/required}}{{/allParams}}{{#hasOptionalParams}}{ {{#allParams}}{{^required}}{{{dataType}}} {{{paramName}}}{{^-last}}, {{/-last}}{{/required}}{{/allParams}} }{{/hasOptionalParams}}) async { {{#hasParams}} // Verify required params are set. {{#allParams}} @@ -175,7 +175,7 @@ class {{{classname}}} { /// {{/-last}} {{/allParams}} - {{#returnType}}Future<{{{returnType}}}> {{/returnType}}{{^returnType}}Future {{/returnType}}{{{nickname}}}({{#allParams}}{{#required}}{{{dataType}}} {{{paramName}}}{{^-last}}, {{/-last}}{{/required}}{{/allParams}}{{#hasOptionalParams}}{ {{#allParams}}{{^required}}{{{dataType}}} {{{paramName}}}{{^-last}}, {{/-last}}{{/required}}{{/allParams}} }{{/hasOptionalParams}}) async { + Future<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}> {{{nickname}}}({{#allParams}}{{#required}}{{{dataType}}} {{{paramName}}}{{^-last}}, {{/-last}}{{/required}}{{/allParams}}{{#hasOptionalParams}}{ {{#allParams}}{{^required}}{{{dataType}}} {{{paramName}}}{{^-last}}, {{/-last}}{{/required}}{{/allParams}} }{{/hasOptionalParams}}) async { final response = await {{{nickname}}}WithHttpInfo({{#allParams}}{{#required}}{{{paramName}}}{{^-last}}, {{/-last}}{{/required}}{{/allParams}}{{#hasOptionalParams}} {{#allParams}}{{^required}}{{{paramName}}}: {{{paramName}}}{{^-last}}, {{/-last}}{{/required}}{{/allParams}} {{/hasOptionalParams}}); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, _decodeBodyBytes(response)); diff --git a/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/pet_api.dart b/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/pet_api.dart index ee68e64c5d9..e9f06fdf425 100644 --- a/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/pet_api.dart +++ b/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/pet_api.dart @@ -18,7 +18,7 @@ class PetApi { /// Add a new pet to the store /// /// - FutureaddPet( + Future> addPet( Pet body, { CancelToken cancelToken, Map headers, @@ -69,7 +69,7 @@ class PetApi { /// Deletes a pet /// /// - FuturedeletePet( + Future> deletePet( int petId, { String apiKey, CancelToken cancelToken, @@ -115,7 +115,7 @@ class PetApi { /// Finds Pets by status /// /// Multiple status values can be provided with comma separated strings - Future>>findPetsByStatus( + Future>> findPetsByStatus( BuiltList status, { CancelToken cancelToken, Map headers, @@ -174,7 +174,7 @@ class PetApi { /// Finds Pets by tags /// /// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - Future>>findPetsByTags( + Future>> findPetsByTags( BuiltList tags, { CancelToken cancelToken, Map headers, @@ -233,7 +233,7 @@ class PetApi { /// Find pet by ID /// /// Returns a single pet - Future>getPetById( + Future> getPetById( int petId, { CancelToken cancelToken, Map headers, @@ -292,7 +292,7 @@ class PetApi { /// Update an existing pet /// /// - FutureupdatePet( + Future> updatePet( Pet body, { CancelToken cancelToken, Map headers, @@ -343,7 +343,7 @@ class PetApi { /// Updates a pet in the store with form data /// /// - FutureupdatePetWithForm( + Future> updatePetWithForm( int petId, { String name, String status, @@ -396,7 +396,7 @@ class PetApi { /// uploads an image /// /// - Future>uploadFile( + Future> uploadFile( int petId, { String additionalMetadata, Uint8List file, diff --git a/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/store_api.dart b/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/store_api.dart index e78254bcd1c..a88515706b3 100644 --- a/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/store_api.dart +++ b/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/store_api.dart @@ -15,7 +15,7 @@ class StoreApi { /// Delete purchase order by ID /// /// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - FuturedeleteOrder( + Future> deleteOrder( String orderId, { CancelToken cancelToken, Map headers, @@ -54,7 +54,7 @@ class StoreApi { /// Returns pet inventories by status /// /// Returns a map of status codes to quantities - Future>>getInventory({ + Future>> getInventory({ CancelToken cancelToken, Map headers, ProgressCallback onSendProgress, @@ -113,7 +113,7 @@ class StoreApi { /// Find purchase order by ID /// /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - Future>getOrderById( + Future> getOrderById( int orderId, { CancelToken cancelToken, Map headers, @@ -165,7 +165,7 @@ class StoreApi { /// Place an order for a pet /// /// - Future>placeOrder( + Future> placeOrder( Order body, { CancelToken cancelToken, Map headers, diff --git a/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/user_api.dart b/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/user_api.dart index d8cb6240a00..25bb52f6d3f 100644 --- a/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/user_api.dart +++ b/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/user_api.dart @@ -15,7 +15,7 @@ class UserApi { /// Create user /// /// This can only be done by the logged in user. - FuturecreateUser( + Future> createUser( User body, { CancelToken cancelToken, Map headers, @@ -58,7 +58,7 @@ class UserApi { /// Creates list of users with given input array /// /// - FuturecreateUsersWithArrayInput( + Future> createUsersWithArrayInput( BuiltList body, { CancelToken cancelToken, Map headers, @@ -102,7 +102,7 @@ class UserApi { /// Creates list of users with given input array /// /// - FuturecreateUsersWithListInput( + Future> createUsersWithListInput( BuiltList body, { CancelToken cancelToken, Map headers, @@ -146,7 +146,7 @@ class UserApi { /// Delete user /// /// This can only be done by the logged in user. - FuturedeleteUser( + Future> deleteUser( String username, { CancelToken cancelToken, Map headers, @@ -185,7 +185,7 @@ class UserApi { /// Get user by user name /// /// - Future>getUserByName( + Future> getUserByName( String username, { CancelToken cancelToken, Map headers, @@ -237,7 +237,7 @@ class UserApi { /// Logs user into the system /// /// - Future>loginUser( + Future> loginUser( String username, String password, { CancelToken cancelToken, @@ -291,7 +291,7 @@ class UserApi { /// Logs out current logged in user session /// /// - FuturelogoutUser({ + Future> logoutUser({ CancelToken cancelToken, Map headers, ProgressCallback onSendProgress, @@ -329,7 +329,7 @@ class UserApi { /// Updated user /// /// This can only be done by the logged in user. - FutureupdateUser( + Future> updateUser( String username, User body, { CancelToken cancelToken, diff --git a/samples/client/petstore/dart2/petstore_client_lib/lib/api/pet_api.dart b/samples/client/petstore/dart2/petstore_client_lib/lib/api/pet_api.dart index 8c835c6d671..5611cb3d2c6 100644 --- a/samples/client/petstore/dart2/petstore_client_lib/lib/api/pet_api.dart +++ b/samples/client/petstore/dart2/petstore_client_lib/lib/api/pet_api.dart @@ -23,7 +23,7 @@ class PetApi { /// /// * [Pet] body (required): /// Pet object that needs to be added to the store - Future addPetWithHttpInfo(Pet body) async { + Future addPetWithHttpInfo(Pet body) async { // Verify required params are set. if (body == null) { throw ApiException(HttpStatus.badRequest, 'Missing required param: body'); @@ -71,7 +71,7 @@ class PetApi { /// /// * [Pet] body (required): /// Pet object that needs to be added to the store - Future addPet(Pet body) async { + Future addPet(Pet body) async { final response = await addPetWithHttpInfo(body); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, _decodeBodyBytes(response)); @@ -88,7 +88,7 @@ class PetApi { /// Pet id to delete /// /// * [String] apiKey: - Future deletePetWithHttpInfo(int petId, { String apiKey }) async { + Future deletePetWithHttpInfo(int petId, { String apiKey }) async { // Verify required params are set. if (petId == null) { throw ApiException(HttpStatus.badRequest, 'Missing required param: petId'); @@ -143,7 +143,7 @@ class PetApi { /// Pet id to delete /// /// * [String] apiKey: - Future deletePet(int petId, { String apiKey }) async { + Future deletePet(int petId, { String apiKey }) async { final response = await deletePetWithHttpInfo(petId, apiKey: apiKey ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, _decodeBodyBytes(response)); @@ -389,7 +389,7 @@ class PetApi { /// /// * [Pet] body (required): /// Pet object that needs to be added to the store - Future updatePetWithHttpInfo(Pet body) async { + Future updatePetWithHttpInfo(Pet body) async { // Verify required params are set. if (body == null) { throw ApiException(HttpStatus.badRequest, 'Missing required param: body'); @@ -437,7 +437,7 @@ class PetApi { /// /// * [Pet] body (required): /// Pet object that needs to be added to the store - Future updatePet(Pet body) async { + Future updatePet(Pet body) async { final response = await updatePetWithHttpInfo(body); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, _decodeBodyBytes(response)); @@ -458,7 +458,7 @@ class PetApi { /// /// * [String] status: /// Updated status of the pet - Future updatePetWithFormWithHttpInfo(int petId, { String name, String status }) async { + Future updatePetWithFormWithHttpInfo(int petId, { String name, String status }) async { // Verify required params are set. if (petId == null) { throw ApiException(HttpStatus.badRequest, 'Missing required param: petId'); @@ -527,7 +527,7 @@ class PetApi { /// /// * [String] status: /// Updated status of the pet - Future updatePetWithForm(int petId, { String name, String status }) async { + Future updatePetWithForm(int petId, { String name, String status }) async { final response = await updatePetWithFormWithHttpInfo(petId, name: name, status: status ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, _decodeBodyBytes(response)); diff --git a/samples/client/petstore/dart2/petstore_client_lib/lib/api/store_api.dart b/samples/client/petstore/dart2/petstore_client_lib/lib/api/store_api.dart index 6b6004a16ce..fa0ac683e78 100644 --- a/samples/client/petstore/dart2/petstore_client_lib/lib/api/store_api.dart +++ b/samples/client/petstore/dart2/petstore_client_lib/lib/api/store_api.dart @@ -25,7 +25,7 @@ class StoreApi { /// /// * [String] orderId (required): /// ID of the order that needs to be deleted - Future deleteOrderWithHttpInfo(String orderId) async { + Future deleteOrderWithHttpInfo(String orderId) async { // Verify required params are set. if (orderId == null) { throw ApiException(HttpStatus.badRequest, 'Missing required param: orderId'); @@ -76,7 +76,7 @@ class StoreApi { /// /// * [String] orderId (required): /// ID of the order that needs to be deleted - Future deleteOrder(String orderId) async { + Future deleteOrder(String orderId) async { final response = await deleteOrderWithHttpInfo(orderId); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, _decodeBodyBytes(response)); diff --git a/samples/client/petstore/dart2/petstore_client_lib/lib/api/user_api.dart b/samples/client/petstore/dart2/petstore_client_lib/lib/api/user_api.dart index cfa14ee2e8b..de7e2ace8ce 100644 --- a/samples/client/petstore/dart2/petstore_client_lib/lib/api/user_api.dart +++ b/samples/client/petstore/dart2/petstore_client_lib/lib/api/user_api.dart @@ -25,7 +25,7 @@ class UserApi { /// /// * [User] body (required): /// Created user object - Future createUserWithHttpInfo(User body) async { + Future createUserWithHttpInfo(User body) async { // Verify required params are set. if (body == null) { throw ApiException(HttpStatus.badRequest, 'Missing required param: body'); @@ -75,7 +75,7 @@ class UserApi { /// /// * [User] body (required): /// Created user object - Future createUser(User body) async { + Future createUser(User body) async { final response = await createUserWithHttpInfo(body); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, _decodeBodyBytes(response)); @@ -90,7 +90,7 @@ class UserApi { /// /// * [List] body (required): /// List of user object - Future createUsersWithArrayInputWithHttpInfo(List body) async { + Future createUsersWithArrayInputWithHttpInfo(List body) async { // Verify required params are set. if (body == null) { throw ApiException(HttpStatus.badRequest, 'Missing required param: body'); @@ -138,7 +138,7 @@ class UserApi { /// /// * [List] body (required): /// List of user object - Future createUsersWithArrayInput(List body) async { + Future createUsersWithArrayInput(List body) async { final response = await createUsersWithArrayInputWithHttpInfo(body); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, _decodeBodyBytes(response)); @@ -153,7 +153,7 @@ class UserApi { /// /// * [List] body (required): /// List of user object - Future createUsersWithListInputWithHttpInfo(List body) async { + Future createUsersWithListInputWithHttpInfo(List body) async { // Verify required params are set. if (body == null) { throw ApiException(HttpStatus.badRequest, 'Missing required param: body'); @@ -201,7 +201,7 @@ class UserApi { /// /// * [List] body (required): /// List of user object - Future createUsersWithListInput(List body) async { + Future createUsersWithListInput(List body) async { final response = await createUsersWithListInputWithHttpInfo(body); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, _decodeBodyBytes(response)); @@ -218,7 +218,7 @@ class UserApi { /// /// * [String] username (required): /// The name that needs to be deleted - Future deleteUserWithHttpInfo(String username) async { + Future deleteUserWithHttpInfo(String username) async { // Verify required params are set. if (username == null) { throw ApiException(HttpStatus.badRequest, 'Missing required param: username'); @@ -269,7 +269,7 @@ class UserApi { /// /// * [String] username (required): /// The name that needs to be deleted - Future deleteUser(String username) async { + Future deleteUser(String username) async { final response = await deleteUserWithHttpInfo(username); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, _decodeBodyBytes(response)); @@ -432,7 +432,7 @@ class UserApi { /// Logs out current logged in user session /// /// Note: This method returns the HTTP [Response]. - Future logoutUserWithHttpInfo() async { + Future logoutUserWithHttpInfo() async { final path = '/user/logout'.replaceAll('{format}', 'json'); Object postBody; @@ -470,7 +470,7 @@ class UserApi { } /// Logs out current logged in user session - Future logoutUser() async { + Future logoutUser() async { final response = await logoutUserWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, _decodeBodyBytes(response)); @@ -490,7 +490,7 @@ class UserApi { /// /// * [User] body (required): /// Updated user object - Future updateUserWithHttpInfo(String username, User body) async { + Future updateUserWithHttpInfo(String username, User body) async { // Verify required params are set. if (username == null) { throw ApiException(HttpStatus.badRequest, 'Missing required param: username'); @@ -547,7 +547,7 @@ class UserApi { /// /// * [User] body (required): /// Updated user object - Future updateUser(String username, User body) async { + Future updateUser(String username, User body) async { final response = await updateUserWithHttpInfo(username, body); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, _decodeBodyBytes(response)); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/pet_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/pet_api.dart index ee54c2f0cef..3874a0993d6 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/pet_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/pet_api.dart @@ -18,7 +18,7 @@ class PetApi { /// Add a new pet to the store /// /// - Future>addPet( + Future> addPet( Pet pet, { CancelToken cancelToken, Map headers, @@ -82,7 +82,7 @@ class PetApi { /// Deletes a pet /// /// - FuturedeletePet( + Future> deletePet( int petId, { String apiKey, CancelToken cancelToken, @@ -128,7 +128,7 @@ class PetApi { /// Finds Pets by status /// /// Multiple status values can be provided with comma separated strings - Future>>findPetsByStatus( + Future>> findPetsByStatus( BuiltList status, { CancelToken cancelToken, Map headers, @@ -187,7 +187,7 @@ class PetApi { /// Finds Pets by tags /// /// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - Future>>findPetsByTags( + Future>> findPetsByTags( BuiltList tags, { CancelToken cancelToken, Map headers, @@ -246,7 +246,7 @@ class PetApi { /// Find pet by ID /// /// Returns a single pet - Future>getPetById( + Future> getPetById( int petId, { CancelToken cancelToken, Map headers, @@ -305,7 +305,7 @@ class PetApi { /// Update an existing pet /// /// - Future>updatePet( + Future> updatePet( Pet pet, { CancelToken cancelToken, Map headers, @@ -369,7 +369,7 @@ class PetApi { /// Updates a pet in the store with form data /// /// - FutureupdatePetWithForm( + Future> updatePetWithForm( int petId, { String name, String status, @@ -422,7 +422,7 @@ class PetApi { /// uploads an image /// /// - Future>uploadFile( + Future> uploadFile( int petId, { String additionalMetadata, Uint8List file, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/store_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/store_api.dart index e22d0a19435..24c20b20a00 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/store_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/store_api.dart @@ -15,7 +15,7 @@ class StoreApi { /// Delete purchase order by ID /// /// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - FuturedeleteOrder( + Future> deleteOrder( String orderId, { CancelToken cancelToken, Map headers, @@ -54,7 +54,7 @@ class StoreApi { /// Returns pet inventories by status /// /// Returns a map of status codes to quantities - Future>>getInventory({ + Future>> getInventory({ CancelToken cancelToken, Map headers, ProgressCallback onSendProgress, @@ -113,7 +113,7 @@ class StoreApi { /// Find purchase order by ID /// /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - Future>getOrderById( + Future> getOrderById( int orderId, { CancelToken cancelToken, Map headers, @@ -165,7 +165,7 @@ class StoreApi { /// Place an order for a pet /// /// - Future>placeOrder( + Future> placeOrder( Order order, { CancelToken cancelToken, Map headers, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/user_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/user_api.dart index 63a2e4cc940..8465f56a8f0 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/user_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/user_api.dart @@ -15,7 +15,7 @@ class UserApi { /// Create user /// /// This can only be done by the logged in user. - FuturecreateUser( + Future> createUser( User user, { CancelToken cancelToken, Map headers, @@ -67,7 +67,7 @@ class UserApi { /// Creates list of users with given input array /// /// - FuturecreateUsersWithArrayInput( + Future> createUsersWithArrayInput( BuiltList user, { CancelToken cancelToken, Map headers, @@ -120,7 +120,7 @@ class UserApi { /// Creates list of users with given input array /// /// - FuturecreateUsersWithListInput( + Future> createUsersWithListInput( BuiltList user, { CancelToken cancelToken, Map headers, @@ -173,7 +173,7 @@ class UserApi { /// Delete user /// /// This can only be done by the logged in user. - FuturedeleteUser( + Future> deleteUser( String username, { CancelToken cancelToken, Map headers, @@ -219,7 +219,7 @@ class UserApi { /// Get user by user name /// /// - Future>getUserByName( + Future> getUserByName( String username, { CancelToken cancelToken, Map headers, @@ -271,7 +271,7 @@ class UserApi { /// Logs user into the system /// /// - Future>loginUser( + Future> loginUser( String username, String password, { CancelToken cancelToken, @@ -325,7 +325,7 @@ class UserApi { /// Logs out current logged in user session /// /// - FuturelogoutUser({ + Future> logoutUser({ CancelToken cancelToken, Map headers, ProgressCallback onSendProgress, @@ -370,7 +370,7 @@ class UserApi { /// Updated user /// /// This can only be done by the logged in user. - FutureupdateUser( + Future> updateUser( String username, User user, { CancelToken cancelToken, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/another_fake_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/another_fake_api.dart index cea5cd42417..84561eaab29 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/another_fake_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/another_fake_api.dart @@ -14,7 +14,7 @@ class AnotherFakeApi { /// To test special tags /// /// To test special tags and operation ID starting with number - Future>call123testSpecialTags( + Future> call123testSpecialTags( Client client, { CancelToken cancelToken, Map headers, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/default_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/default_api.dart index ebe1e416b1d..793adab0628 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/default_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/default_api.dart @@ -14,7 +14,7 @@ class DefaultApi { /// /// /// - Future>fooGet({ + Future> fooGet({ CancelToken cancelToken, Map headers, ProgressCallback onSendProgress, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/fake_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/fake_api.dart index 25a12899622..0ae212b39e0 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/fake_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/fake_api.dart @@ -22,7 +22,7 @@ class FakeApi { /// Health check endpoint /// /// - Future>fakeHealthGet({ + Future> fakeHealthGet({ CancelToken cancelToken, Map headers, ProgressCallback onSendProgress, @@ -73,7 +73,7 @@ class FakeApi { /// test http signature authentication /// /// - FuturefakeHttpSignatureTest( + Future> fakeHttpSignatureTest( Pet pet, { String query1, String header1, @@ -128,7 +128,7 @@ class FakeApi { /// /// /// Test serialization of outer boolean types - Future>fakeOuterBooleanSerialize({ + Future> fakeOuterBooleanSerialize({ bool body, CancelToken cancelToken, Map headers, @@ -185,7 +185,7 @@ class FakeApi { /// /// /// Test serialization of object with outer number type - Future>fakeOuterCompositeSerialize({ + Future> fakeOuterCompositeSerialize({ OuterComposite outerComposite, CancelToken cancelToken, Map headers, @@ -243,7 +243,7 @@ class FakeApi { /// /// /// Test serialization of outer number types - Future>fakeOuterNumberSerialize({ + Future> fakeOuterNumberSerialize({ num body, CancelToken cancelToken, Map headers, @@ -300,7 +300,7 @@ class FakeApi { /// /// /// Test serialization of outer string types - Future>fakeOuterStringSerialize({ + Future> fakeOuterStringSerialize({ String body, CancelToken cancelToken, Map headers, @@ -357,7 +357,7 @@ class FakeApi { /// /// /// For this test, the body for this request much reference a schema named `File`. - FuturetestBodyWithFileSchema( + Future> testBodyWithFileSchema( FileSchemaTestClass fileSchemaTestClass, { CancelToken cancelToken, Map headers, @@ -402,7 +402,7 @@ class FakeApi { /// /// /// - FuturetestBodyWithQueryParams( + Future> testBodyWithQueryParams( String query, User user, { CancelToken cancelToken, @@ -449,7 +449,7 @@ class FakeApi { /// To test \"client\" model /// /// To test \"client\" model - Future>testClientModel( + Future> testClientModel( Client client, { CancelToken cancelToken, Map headers, @@ -507,7 +507,7 @@ class FakeApi { /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - FuturetestEndpointParameters( + Future> testEndpointParameters( num number, double double_, String patternWithoutDelimiter, @@ -583,7 +583,7 @@ class FakeApi { /// To test enum parameters /// /// To test enum parameters - FuturetestEnumParameters({ + Future> testEnumParameters({ BuiltList enumHeaderStringArray, String enumHeaderString, BuiltList enumQueryStringArray, @@ -642,7 +642,7 @@ class FakeApi { /// Fake endpoint to test group parameters (optional) /// /// Fake endpoint to test group parameters (optional) - FuturetestGroupParameters( + Future> testGroupParameters( int requiredStringGroup, bool requiredBooleanGroup, int requiredInt64Group, { @@ -697,7 +697,7 @@ class FakeApi { /// test inline additionalProperties /// /// - FuturetestInlineAdditionalProperties( + Future> testInlineAdditionalProperties( BuiltMap requestBody, { CancelToken cancelToken, Map headers, @@ -742,7 +742,7 @@ class FakeApi { /// test json serialization of form data /// /// - FuturetestJsonFormData( + Future> testJsonFormData( String param, String param2, { CancelToken cancelToken, @@ -789,7 +789,7 @@ class FakeApi { /// /// /// To test the collection format in query parameters - FuturetestQueryParameterCollectionFormat( + Future> testQueryParameterCollectionFormat( BuiltList pipe, BuiltList ioutil, BuiltList http, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/fake_classname_tags123_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/fake_classname_tags123_api.dart index b18a9dbce6e..3b4ae19dee1 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/fake_classname_tags123_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/fake_classname_tags123_api.dart @@ -14,7 +14,7 @@ class FakeClassnameTags123Api { /// To test class name in snake case /// /// To test class name in snake case - Future>testClassname( + Future> testClassname( Client client, { CancelToken cancelToken, Map headers, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/pet_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/pet_api.dart index 1e9b180fc49..6ef0ef3919a 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/pet_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/pet_api.dart @@ -18,7 +18,7 @@ class PetApi { /// Add a new pet to the store /// /// - FutureaddPet( + Future> addPet( Pet pet, { CancelToken cancelToken, Map headers, @@ -69,7 +69,7 @@ class PetApi { /// Deletes a pet /// /// - FuturedeletePet( + Future> deletePet( int petId, { String apiKey, CancelToken cancelToken, @@ -115,7 +115,7 @@ class PetApi { /// Finds Pets by status /// /// Multiple status values can be provided with comma separated strings - Future>>findPetsByStatus( + Future>> findPetsByStatus( BuiltList status, { CancelToken cancelToken, Map headers, @@ -174,7 +174,7 @@ class PetApi { /// Finds Pets by tags /// /// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - Future>>findPetsByTags( + Future>> findPetsByTags( BuiltList tags, { CancelToken cancelToken, Map headers, @@ -233,7 +233,7 @@ class PetApi { /// Find pet by ID /// /// Returns a single pet - Future>getPetById( + Future> getPetById( int petId, { CancelToken cancelToken, Map headers, @@ -292,7 +292,7 @@ class PetApi { /// Update an existing pet /// /// - FutureupdatePet( + Future> updatePet( Pet pet, { CancelToken cancelToken, Map headers, @@ -343,7 +343,7 @@ class PetApi { /// Updates a pet in the store with form data /// /// - FutureupdatePetWithForm( + Future> updatePetWithForm( int petId, { String name, String status, @@ -396,7 +396,7 @@ class PetApi { /// uploads an image /// /// - Future>uploadFile( + Future> uploadFile( int petId, { String additionalMetadata, Uint8List file, @@ -466,7 +466,7 @@ class PetApi { /// uploads an image (required) /// /// - Future>uploadFileWithRequiredFile( + Future> uploadFileWithRequiredFile( int petId, Uint8List requiredFile, { String additionalMetadata, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/store_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/store_api.dart index 41ee378c75f..5158a31a685 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/store_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/store_api.dart @@ -15,7 +15,7 @@ class StoreApi { /// Delete purchase order by ID /// /// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - FuturedeleteOrder( + Future> deleteOrder( String orderId, { CancelToken cancelToken, Map headers, @@ -54,7 +54,7 @@ class StoreApi { /// Returns pet inventories by status /// /// Returns a map of status codes to quantities - Future>>getInventory({ + Future>> getInventory({ CancelToken cancelToken, Map headers, ProgressCallback onSendProgress, @@ -113,7 +113,7 @@ class StoreApi { /// Find purchase order by ID /// /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - Future>getOrderById( + Future> getOrderById( int orderId, { CancelToken cancelToken, Map headers, @@ -165,7 +165,7 @@ class StoreApi { /// Place an order for a pet /// /// - Future>placeOrder( + Future> placeOrder( Order order, { CancelToken cancelToken, Map headers, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/user_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/user_api.dart index 2d10af5d80b..b7ae8fb8648 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/user_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/user_api.dart @@ -15,7 +15,7 @@ class UserApi { /// Create user /// /// This can only be done by the logged in user. - FuturecreateUser( + Future> createUser( User user, { CancelToken cancelToken, Map headers, @@ -60,7 +60,7 @@ class UserApi { /// Creates list of users with given input array /// /// - FuturecreateUsersWithArrayInput( + Future> createUsersWithArrayInput( BuiltList user, { CancelToken cancelToken, Map headers, @@ -106,7 +106,7 @@ class UserApi { /// Creates list of users with given input array /// /// - FuturecreateUsersWithListInput( + Future> createUsersWithListInput( BuiltList user, { CancelToken cancelToken, Map headers, @@ -152,7 +152,7 @@ class UserApi { /// Delete user /// /// This can only be done by the logged in user. - FuturedeleteUser( + Future> deleteUser( String username, { CancelToken cancelToken, Map headers, @@ -191,7 +191,7 @@ class UserApi { /// Get user by user name /// /// - Future>getUserByName( + Future> getUserByName( String username, { CancelToken cancelToken, Map headers, @@ -243,7 +243,7 @@ class UserApi { /// Logs user into the system /// /// - Future>loginUser( + Future> loginUser( String username, String password, { CancelToken cancelToken, @@ -297,7 +297,7 @@ class UserApi { /// Logs out current logged in user session /// /// - FuturelogoutUser({ + Future> logoutUser({ CancelToken cancelToken, Map headers, ProgressCallback onSendProgress, @@ -335,7 +335,7 @@ class UserApi { /// Updated user /// /// This can only be done by the logged in user. - FutureupdateUser( + Future> updateUser( String username, User user, { CancelToken cancelToken, diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api/pet_api.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api/pet_api.dart index ca9b73ceb49..50e2e25bf74 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api/pet_api.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api/pet_api.dart @@ -95,7 +95,7 @@ class PetApi { /// Pet id to delete /// /// * [String] apiKey: - Future deletePetWithHttpInfo(int petId, { String apiKey }) async { + Future deletePetWithHttpInfo(int petId, { String apiKey }) async { // Verify required params are set. if (petId == null) { throw ApiException(HttpStatus.badRequest, 'Missing required param: petId'); @@ -150,7 +150,7 @@ class PetApi { /// Pet id to delete /// /// * [String] apiKey: - Future deletePet(int petId, { String apiKey }) async { + Future deletePet(int petId, { String apiKey }) async { final response = await deletePetWithHttpInfo(petId, apiKey: apiKey ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, _decodeBodyBytes(response)); @@ -472,7 +472,7 @@ class PetApi { /// /// * [String] status: /// Updated status of the pet - Future updatePetWithFormWithHttpInfo(int petId, { String name, String status }) async { + Future updatePetWithFormWithHttpInfo(int petId, { String name, String status }) async { // Verify required params are set. if (petId == null) { throw ApiException(HttpStatus.badRequest, 'Missing required param: petId'); @@ -541,7 +541,7 @@ class PetApi { /// /// * [String] status: /// Updated status of the pet - Future updatePetWithForm(int petId, { String name, String status }) async { + Future updatePetWithForm(int petId, { String name, String status }) async { final response = await updatePetWithFormWithHttpInfo(petId, name: name, status: status ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, _decodeBodyBytes(response)); diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api/store_api.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api/store_api.dart index 14cbb056efe..66b0d59079d 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api/store_api.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api/store_api.dart @@ -25,7 +25,7 @@ class StoreApi { /// /// * [String] orderId (required): /// ID of the order that needs to be deleted - Future deleteOrderWithHttpInfo(String orderId) async { + Future deleteOrderWithHttpInfo(String orderId) async { // Verify required params are set. if (orderId == null) { throw ApiException(HttpStatus.badRequest, 'Missing required param: orderId'); @@ -76,7 +76,7 @@ class StoreApi { /// /// * [String] orderId (required): /// ID of the order that needs to be deleted - Future deleteOrder(String orderId) async { + Future deleteOrder(String orderId) async { final response = await deleteOrderWithHttpInfo(orderId); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, _decodeBodyBytes(response)); diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api/user_api.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api/user_api.dart index b45b14b9ae0..ed6dc5f0900 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api/user_api.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api/user_api.dart @@ -25,7 +25,7 @@ class UserApi { /// /// * [User] user (required): /// Created user object - Future createUserWithHttpInfo(User user) async { + Future createUserWithHttpInfo(User user) async { // Verify required params are set. if (user == null) { throw ApiException(HttpStatus.badRequest, 'Missing required param: user'); @@ -75,7 +75,7 @@ class UserApi { /// /// * [User] user (required): /// Created user object - Future createUser(User user) async { + Future createUser(User user) async { final response = await createUserWithHttpInfo(user); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, _decodeBodyBytes(response)); @@ -90,7 +90,7 @@ class UserApi { /// /// * [List] user (required): /// List of user object - Future createUsersWithArrayInputWithHttpInfo(List user) async { + Future createUsersWithArrayInputWithHttpInfo(List user) async { // Verify required params are set. if (user == null) { throw ApiException(HttpStatus.badRequest, 'Missing required param: user'); @@ -138,7 +138,7 @@ class UserApi { /// /// * [List] user (required): /// List of user object - Future createUsersWithArrayInput(List user) async { + Future createUsersWithArrayInput(List user) async { final response = await createUsersWithArrayInputWithHttpInfo(user); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, _decodeBodyBytes(response)); @@ -153,7 +153,7 @@ class UserApi { /// /// * [List] user (required): /// List of user object - Future createUsersWithListInputWithHttpInfo(List user) async { + Future createUsersWithListInputWithHttpInfo(List user) async { // Verify required params are set. if (user == null) { throw ApiException(HttpStatus.badRequest, 'Missing required param: user'); @@ -201,7 +201,7 @@ class UserApi { /// /// * [List] user (required): /// List of user object - Future createUsersWithListInput(List user) async { + Future createUsersWithListInput(List user) async { final response = await createUsersWithListInputWithHttpInfo(user); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, _decodeBodyBytes(response)); @@ -218,7 +218,7 @@ class UserApi { /// /// * [String] username (required): /// The name that needs to be deleted - Future deleteUserWithHttpInfo(String username) async { + Future deleteUserWithHttpInfo(String username) async { // Verify required params are set. if (username == null) { throw ApiException(HttpStatus.badRequest, 'Missing required param: username'); @@ -269,7 +269,7 @@ class UserApi { /// /// * [String] username (required): /// The name that needs to be deleted - Future deleteUser(String username) async { + Future deleteUser(String username) async { final response = await deleteUserWithHttpInfo(username); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, _decodeBodyBytes(response)); @@ -432,7 +432,7 @@ class UserApi { /// Logs out current logged in user session /// /// Note: This method returns the HTTP [Response]. - Future logoutUserWithHttpInfo() async { + Future logoutUserWithHttpInfo() async { final path = '/user/logout'.replaceAll('{format}', 'json'); Object postBody; @@ -470,7 +470,7 @@ class UserApi { } /// Logs out current logged in user session - Future logoutUser() async { + Future logoutUser() async { final response = await logoutUserWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, _decodeBodyBytes(response)); @@ -490,7 +490,7 @@ class UserApi { /// /// * [User] user (required): /// Updated user object - Future updateUserWithHttpInfo(String username, User user) async { + Future updateUserWithHttpInfo(String username, User user) async { // Verify required params are set. if (username == null) { throw ApiException(HttpStatus.badRequest, 'Missing required param: username'); @@ -547,7 +547,7 @@ class UserApi { /// /// * [User] user (required): /// Updated user object - Future updateUser(String username, User user) async { + Future updateUser(String username, User user) async { final response = await updateUserWithHttpInfo(username, user); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, _decodeBodyBytes(response)); diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/fake_api.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/fake_api.dart index ea2e928400a..4ab4555246a 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/fake_api.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/fake_api.dart @@ -84,7 +84,7 @@ class FakeApi { /// /// * [String] header1: /// header parameter - Future fakeHttpSignatureTestWithHttpInfo(Pet pet, { String query1, String header1 }) async { + Future fakeHttpSignatureTestWithHttpInfo(Pet pet, { String query1, String header1 }) async { // Verify required params are set. if (pet == null) { throw ApiException(HttpStatus.badRequest, 'Missing required param: pet'); @@ -146,7 +146,7 @@ class FakeApi { /// /// * [String] header1: /// header parameter - Future fakeHttpSignatureTest(Pet pet, { String query1, String header1 }) async { + Future fakeHttpSignatureTest(Pet pet, { String query1, String header1 }) async { final response = await fakeHttpSignatureTestWithHttpInfo(pet, query1: query1, header1: header1 ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, _decodeBodyBytes(response)); @@ -428,7 +428,7 @@ class FakeApi { /// Parameters: /// /// * [FileSchemaTestClass] fileSchemaTestClass (required): - Future testBodyWithFileSchemaWithHttpInfo(FileSchemaTestClass fileSchemaTestClass) async { + Future testBodyWithFileSchemaWithHttpInfo(FileSchemaTestClass fileSchemaTestClass) async { // Verify required params are set. if (fileSchemaTestClass == null) { throw ApiException(HttpStatus.badRequest, 'Missing required param: fileSchemaTestClass'); @@ -475,7 +475,7 @@ class FakeApi { /// Parameters: /// /// * [FileSchemaTestClass] fileSchemaTestClass (required): - Future testBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass) async { + Future testBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass) async { final response = await testBodyWithFileSchemaWithHttpInfo(fileSchemaTestClass); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, _decodeBodyBytes(response)); @@ -488,7 +488,7 @@ class FakeApi { /// * [String] query (required): /// /// * [User] user (required): - Future testBodyWithQueryParamsWithHttpInfo(String query, User user) async { + Future testBodyWithQueryParamsWithHttpInfo(String query, User user) async { // Verify required params are set. if (query == null) { throw ApiException(HttpStatus.badRequest, 'Missing required param: query'); @@ -540,7 +540,7 @@ class FakeApi { /// * [String] query (required): /// /// * [User] user (required): - Future testBodyWithQueryParams(String query, User user) async { + Future testBodyWithQueryParams(String query, User user) async { final response = await testBodyWithQueryParamsWithHttpInfo(query, user); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, _decodeBodyBytes(response)); @@ -670,7 +670,7 @@ class FakeApi { /// /// * [String] callback: /// None - Future testEndpointParametersWithHttpInfo(num number, double double_, String patternWithoutDelimiter, String byte, { int integer, int int32, int int64, double float, String string, MultipartFile binary, DateTime date, DateTime dateTime, String password, String callback }) async { + Future testEndpointParametersWithHttpInfo(num number, double double_, String patternWithoutDelimiter, String byte, { int integer, int int32, int int64, double float, String string, MultipartFile binary, DateTime date, DateTime dateTime, String password, String callback }) async { // Verify required params are set. if (number == null) { throw ApiException(HttpStatus.badRequest, 'Missing required param: number'); @@ -864,7 +864,7 @@ class FakeApi { /// /// * [String] callback: /// None - Future testEndpointParameters(num number, double double_, String patternWithoutDelimiter, String byte, { int integer, int int32, int int64, double float, String string, MultipartFile binary, DateTime date, DateTime dateTime, String password, String callback }) async { + Future testEndpointParameters(num number, double double_, String patternWithoutDelimiter, String byte, { int integer, int int32, int int64, double float, String string, MultipartFile binary, DateTime date, DateTime dateTime, String password, String callback }) async { final response = await testEndpointParametersWithHttpInfo(number, double_, patternWithoutDelimiter, byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, _decodeBodyBytes(response)); @@ -902,7 +902,7 @@ class FakeApi { /// /// * [String] enumFormString: /// Form parameter enum test (string) - Future testEnumParametersWithHttpInfo({ List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, int enumQueryInteger, double enumQueryDouble, List enumFormStringArray, String enumFormString }) async { + Future testEnumParametersWithHttpInfo({ List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, int enumQueryInteger, double enumQueryDouble, List enumFormStringArray, String enumFormString }) async { // Verify required params are set. final path = '/fake'.replaceAll('{format}', 'json'); @@ -1004,7 +1004,7 @@ class FakeApi { /// /// * [String] enumFormString: /// Form parameter enum test (string) - Future testEnumParameters({ List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, int enumQueryInteger, double enumQueryDouble, List enumFormStringArray, String enumFormString }) async { + Future testEnumParameters({ List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, int enumQueryInteger, double enumQueryDouble, List enumFormStringArray, String enumFormString }) async { final response = await testEnumParametersWithHttpInfo( enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, _decodeBodyBytes(response)); @@ -1036,7 +1036,7 @@ class FakeApi { /// /// * [int] int64Group: /// Integer in group parameters - Future testGroupParametersWithHttpInfo(int requiredStringGroup, bool requiredBooleanGroup, int requiredInt64Group, { int stringGroup, bool booleanGroup, int int64Group }) async { + Future testGroupParametersWithHttpInfo(int requiredStringGroup, bool requiredBooleanGroup, int requiredInt64Group, { int stringGroup, bool booleanGroup, int int64Group }) async { // Verify required params are set. if (requiredStringGroup == null) { throw ApiException(HttpStatus.badRequest, 'Missing required param: requiredStringGroup'); @@ -1121,7 +1121,7 @@ class FakeApi { /// /// * [int] int64Group: /// Integer in group parameters - Future testGroupParameters(int requiredStringGroup, bool requiredBooleanGroup, int requiredInt64Group, { int stringGroup, bool booleanGroup, int int64Group }) async { + Future testGroupParameters(int requiredStringGroup, bool requiredBooleanGroup, int requiredInt64Group, { int stringGroup, bool booleanGroup, int int64Group }) async { final response = await testGroupParametersWithHttpInfo(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, _decodeBodyBytes(response)); @@ -1136,7 +1136,7 @@ class FakeApi { /// /// * [Map] requestBody (required): /// request body - Future testInlineAdditionalPropertiesWithHttpInfo(Map requestBody) async { + Future testInlineAdditionalPropertiesWithHttpInfo(Map requestBody) async { // Verify required params are set. if (requestBody == null) { throw ApiException(HttpStatus.badRequest, 'Missing required param: requestBody'); @@ -1184,7 +1184,7 @@ class FakeApi { /// /// * [Map] requestBody (required): /// request body - Future testInlineAdditionalProperties(Map requestBody) async { + Future testInlineAdditionalProperties(Map requestBody) async { final response = await testInlineAdditionalPropertiesWithHttpInfo(requestBody); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, _decodeBodyBytes(response)); @@ -1202,7 +1202,7 @@ class FakeApi { /// /// * [String] param2 (required): /// field2 - Future testJsonFormDataWithHttpInfo(String param, String param2) async { + Future testJsonFormDataWithHttpInfo(String param, String param2) async { // Verify required params are set. if (param == null) { throw ApiException(HttpStatus.badRequest, 'Missing required param: param'); @@ -1270,7 +1270,7 @@ class FakeApi { /// /// * [String] param2 (required): /// field2 - Future testJsonFormData(String param, String param2) async { + Future testJsonFormData(String param, String param2) async { final response = await testJsonFormDataWithHttpInfo(param, param2); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, _decodeBodyBytes(response)); @@ -1292,7 +1292,7 @@ class FakeApi { /// * [List] url (required): /// /// * [List] context (required): - Future testQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context) async { + Future testQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context) async { // Verify required params are set. if (pipe == null) { throw ApiException(HttpStatus.badRequest, 'Missing required param: pipe'); @@ -1365,7 +1365,7 @@ class FakeApi { /// * [List] url (required): /// /// * [List] context (required): - Future testQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context) async { + Future testQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context) async { final response = await testQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, _decodeBodyBytes(response)); diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/pet_api.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/pet_api.dart index dbc7aee7dad..64323b3beec 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/pet_api.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/pet_api.dart @@ -23,7 +23,7 @@ class PetApi { /// /// * [Pet] pet (required): /// Pet object that needs to be added to the store - Future addPetWithHttpInfo(Pet pet) async { + Future addPetWithHttpInfo(Pet pet) async { // Verify required params are set. if (pet == null) { throw ApiException(HttpStatus.badRequest, 'Missing required param: pet'); @@ -71,7 +71,7 @@ class PetApi { /// /// * [Pet] pet (required): /// Pet object that needs to be added to the store - Future addPet(Pet pet) async { + Future addPet(Pet pet) async { final response = await addPetWithHttpInfo(pet); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, _decodeBodyBytes(response)); @@ -88,7 +88,7 @@ class PetApi { /// Pet id to delete /// /// * [String] apiKey: - Future deletePetWithHttpInfo(int petId, { String apiKey }) async { + Future deletePetWithHttpInfo(int petId, { String apiKey }) async { // Verify required params are set. if (petId == null) { throw ApiException(HttpStatus.badRequest, 'Missing required param: petId'); @@ -143,7 +143,7 @@ class PetApi { /// Pet id to delete /// /// * [String] apiKey: - Future deletePet(int petId, { String apiKey }) async { + Future deletePet(int petId, { String apiKey }) async { final response = await deletePetWithHttpInfo(petId, apiKey: apiKey ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, _decodeBodyBytes(response)); @@ -389,7 +389,7 @@ class PetApi { /// /// * [Pet] pet (required): /// Pet object that needs to be added to the store - Future updatePetWithHttpInfo(Pet pet) async { + Future updatePetWithHttpInfo(Pet pet) async { // Verify required params are set. if (pet == null) { throw ApiException(HttpStatus.badRequest, 'Missing required param: pet'); @@ -437,7 +437,7 @@ class PetApi { /// /// * [Pet] pet (required): /// Pet object that needs to be added to the store - Future updatePet(Pet pet) async { + Future updatePet(Pet pet) async { final response = await updatePetWithHttpInfo(pet); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, _decodeBodyBytes(response)); @@ -458,7 +458,7 @@ class PetApi { /// /// * [String] status: /// Updated status of the pet - Future updatePetWithFormWithHttpInfo(int petId, { String name, String status }) async { + Future updatePetWithFormWithHttpInfo(int petId, { String name, String status }) async { // Verify required params are set. if (petId == null) { throw ApiException(HttpStatus.badRequest, 'Missing required param: petId'); @@ -527,7 +527,7 @@ class PetApi { /// /// * [String] status: /// Updated status of the pet - Future updatePetWithForm(int petId, { String name, String status }) async { + Future updatePetWithForm(int petId, { String name, String status }) async { final response = await updatePetWithFormWithHttpInfo(petId, name: name, status: status ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, _decodeBodyBytes(response)); diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/store_api.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/store_api.dart index f585bd0839f..bc0c54eba86 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/store_api.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/store_api.dart @@ -25,7 +25,7 @@ class StoreApi { /// /// * [String] orderId (required): /// ID of the order that needs to be deleted - Future deleteOrderWithHttpInfo(String orderId) async { + Future deleteOrderWithHttpInfo(String orderId) async { // Verify required params are set. if (orderId == null) { throw ApiException(HttpStatus.badRequest, 'Missing required param: orderId'); @@ -76,7 +76,7 @@ class StoreApi { /// /// * [String] orderId (required): /// ID of the order that needs to be deleted - Future deleteOrder(String orderId) async { + Future deleteOrder(String orderId) async { final response = await deleteOrderWithHttpInfo(orderId); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, _decodeBodyBytes(response)); diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/user_api.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/user_api.dart index 787b2ea9620..d8346bcb3b7 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/user_api.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/user_api.dart @@ -25,7 +25,7 @@ class UserApi { /// /// * [User] user (required): /// Created user object - Future createUserWithHttpInfo(User user) async { + Future createUserWithHttpInfo(User user) async { // Verify required params are set. if (user == null) { throw ApiException(HttpStatus.badRequest, 'Missing required param: user'); @@ -75,7 +75,7 @@ class UserApi { /// /// * [User] user (required): /// Created user object - Future createUser(User user) async { + Future createUser(User user) async { final response = await createUserWithHttpInfo(user); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, _decodeBodyBytes(response)); @@ -90,7 +90,7 @@ class UserApi { /// /// * [List] user (required): /// List of user object - Future createUsersWithArrayInputWithHttpInfo(List user) async { + Future createUsersWithArrayInputWithHttpInfo(List user) async { // Verify required params are set. if (user == null) { throw ApiException(HttpStatus.badRequest, 'Missing required param: user'); @@ -138,7 +138,7 @@ class UserApi { /// /// * [List] user (required): /// List of user object - Future createUsersWithArrayInput(List user) async { + Future createUsersWithArrayInput(List user) async { final response = await createUsersWithArrayInputWithHttpInfo(user); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, _decodeBodyBytes(response)); @@ -153,7 +153,7 @@ class UserApi { /// /// * [List] user (required): /// List of user object - Future createUsersWithListInputWithHttpInfo(List user) async { + Future createUsersWithListInputWithHttpInfo(List user) async { // Verify required params are set. if (user == null) { throw ApiException(HttpStatus.badRequest, 'Missing required param: user'); @@ -201,7 +201,7 @@ class UserApi { /// /// * [List] user (required): /// List of user object - Future createUsersWithListInput(List user) async { + Future createUsersWithListInput(List user) async { final response = await createUsersWithListInputWithHttpInfo(user); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, _decodeBodyBytes(response)); @@ -218,7 +218,7 @@ class UserApi { /// /// * [String] username (required): /// The name that needs to be deleted - Future deleteUserWithHttpInfo(String username) async { + Future deleteUserWithHttpInfo(String username) async { // Verify required params are set. if (username == null) { throw ApiException(HttpStatus.badRequest, 'Missing required param: username'); @@ -269,7 +269,7 @@ class UserApi { /// /// * [String] username (required): /// The name that needs to be deleted - Future deleteUser(String username) async { + Future deleteUser(String username) async { final response = await deleteUserWithHttpInfo(username); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, _decodeBodyBytes(response)); @@ -432,7 +432,7 @@ class UserApi { /// Logs out current logged in user session /// /// Note: This method returns the HTTP [Response]. - Future logoutUserWithHttpInfo() async { + Future logoutUserWithHttpInfo() async { final path = '/user/logout'.replaceAll('{format}', 'json'); Object postBody; @@ -470,7 +470,7 @@ class UserApi { } /// Logs out current logged in user session - Future logoutUser() async { + Future logoutUser() async { final response = await logoutUserWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, _decodeBodyBytes(response)); @@ -490,7 +490,7 @@ class UserApi { /// /// * [User] user (required): /// Updated user object - Future updateUserWithHttpInfo(String username, User user) async { + Future updateUserWithHttpInfo(String username, User user) async { // Verify required params are set. if (username == null) { throw ApiException(HttpStatus.badRequest, 'Missing required param: username'); @@ -547,7 +547,7 @@ class UserApi { /// /// * [User] user (required): /// Updated user object - Future updateUser(String username, User user) async { + Future updateUser(String username, User user) async { final response = await updateUserWithHttpInfo(username, user); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, _decodeBodyBytes(response));