From d77ab6b9e20401ca81b9eeb00ca7dff9fa40f2d2 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Fri, 15 May 2020 09:44:00 +0800 Subject: [PATCH] update dart samples --- .../dart-dio/.openapi-generator/VERSION | 2 +- .../petstore_client_lib/lib/api/pet_api.dart | 26 +++++++++++++++++++ .../lib/api/store_api.dart | 6 +++++ .../petstore_client_lib/lib/api/user_api.dart | 18 +++++++++++++ 4 files changed, 51 insertions(+), 1 deletion(-) diff --git a/samples/client/petstore/dart-dio/.openapi-generator/VERSION b/samples/client/petstore/dart-dio/.openapi-generator/VERSION index 71d2eb1c7fc..d99e7162d01 100644 --- a/samples/client/petstore/dart-dio/.openapi-generator/VERSION +++ b/samples/client/petstore/dart-dio/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0-SNAPSHOT +5.0.0-SNAPSHOT \ No newline at end of file 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 a413df7b424..56efbc2492b 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 @@ -53,6 +53,8 @@ class PetApi { /// Add a new pet to the store /// + ///Pet body (required): + /// Pet object that needs to be added to the store /// Future addPet(Pet body) async { Response response = await addPetWithHttpInfo(body); @@ -111,6 +113,10 @@ class PetApi { /// Deletes a pet /// + ///int petId (required): + /// Pet id to delete + ///String apiKey : + /// /// Future deletePet(int petId, { String apiKey }) async { Response response = await deletePetWithHttpInfo(petId, apiKey: apiKey ); @@ -169,6 +175,8 @@ class PetApi { /// Finds Pets by status /// + ///List<String> status (required): + /// Status values that need to be considered for filter /// Multiple status values can be provided with comma separated strings Future> findPetsByStatus(List status) async { Response response = await findPetsByStatusWithHttpInfo(status); @@ -228,6 +236,8 @@ class PetApi { /// Finds Pets by tags /// + ///List<String> tags (required): + /// Tags to filter by /// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. Future> findPetsByTags(List tags) async { Response response = await findPetsByTagsWithHttpInfo(tags); @@ -286,6 +296,8 @@ class PetApi { /// Find pet by ID /// + ///int petId (required): + /// ID of pet to return /// Returns a single pet Future getPetById(int petId) async { Response response = await getPetByIdWithHttpInfo(petId); @@ -344,6 +356,8 @@ class PetApi { /// Update an existing pet /// + ///Pet body (required): + /// Pet object that needs to be added to the store /// Future updatePet(Pet body) async { Response response = await updatePetWithHttpInfo(body); @@ -413,6 +427,12 @@ class PetApi { /// Updates a pet in the store with form data /// + ///int petId (required): + /// ID of pet that needs to be updated + ///String name : + /// Updated name of the pet + ///String status : + /// Updated status of the pet /// Future updatePetWithForm(int petId, { String name, String status }) async { Response response = await updatePetWithFormWithHttpInfo(petId, name: name, status: status ); @@ -481,6 +501,12 @@ class PetApi { /// uploads an image /// + ///int petId (required): + /// ID of pet to update + ///String additionalMetadata : + /// Additional data to pass to server + ///MultipartFile file : + /// file to upload /// Future uploadFile(int petId, { String additionalMetadata, MultipartFile file }) async { Response response = await uploadFileWithHttpInfo(petId, additionalMetadata: additionalMetadata, file: file ); 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 10dc4a35b85..3c10ba5454c 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 @@ -53,6 +53,8 @@ class StoreApi { /// Delete purchase order by ID /// + ///String orderId (required): + /// ID of the order that needs to be deleted /// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors Future deleteOrder(String orderId) async { Response response = await deleteOrderWithHttpInfo(orderId); @@ -166,6 +168,8 @@ class StoreApi { /// Find purchase order by ID /// + ///int orderId (required): + /// ID of pet that needs to be fetched /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions Future getOrderById(int orderId) async { Response response = await getOrderByIdWithHttpInfo(orderId); @@ -224,6 +228,8 @@ class StoreApi { /// Place an order for a pet /// + ///Order body (required): + /// order placed for purchasing the pet /// Future placeOrder(Order body) async { Response response = await placeOrderWithHttpInfo(body); 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 a940ca41071..ea069b58ea8 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 @@ -53,6 +53,8 @@ class UserApi { /// Create user /// + ///User body (required): + /// Created user object /// This can only be done by the logged in user. Future createUser(User body) async { Response response = await createUserWithHttpInfo(body); @@ -110,6 +112,8 @@ class UserApi { /// Creates list of users with given input array /// + ///List<User> body (required): + /// List of user object /// Future createUsersWithArrayInput(List body) async { Response response = await createUsersWithArrayInputWithHttpInfo(body); @@ -167,6 +171,8 @@ class UserApi { /// Creates list of users with given input array /// + ///List<User> body (required): + /// List of user object /// Future createUsersWithListInput(List body) async { Response response = await createUsersWithListInputWithHttpInfo(body); @@ -224,6 +230,8 @@ class UserApi { /// Delete user /// + ///String username (required): + /// The name that needs to be deleted /// This can only be done by the logged in user. Future deleteUser(String username) async { Response response = await deleteUserWithHttpInfo(username); @@ -281,6 +289,8 @@ class UserApi { /// Get user by user name /// + ///String username (required): + /// The name that needs to be fetched. Use user1 for testing. /// Future getUserByName(String username) async { Response response = await getUserByNameWithHttpInfo(username); @@ -344,6 +354,10 @@ class UserApi { /// Logs user into the system /// + ///String username (required): + /// The user name for login + ///String password (required): + /// The password for login in clear text /// Future loginUser(String username, String password) async { Response response = await loginUserWithHttpInfo(username, password); @@ -459,6 +473,10 @@ class UserApi { /// Updated user /// + ///String username (required): + /// name that need to be deleted + ///User body (required): + /// Updated user object /// This can only be done by the logged in user. Future updateUser(String username, User body) async { Response response = await updateUserWithHttpInfo(username, body);