forked from loafle/openapi-generator-original
update dart samples
This commit is contained in:
parent
9a0058f577
commit
d77ab6b9e2
@ -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<List<Pet>> findPetsByStatus(List<String> 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<List<Pet>> findPetsByTags(List<String> 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<Pet> 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<ApiResponse> uploadFile(int petId, { String additionalMetadata, MultipartFile file }) async {
|
||||
Response response = await uploadFileWithHttpInfo(petId, additionalMetadata: additionalMetadata, file: file );
|
||||
|
@ -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<Order> 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<Order> placeOrder(Order body) async {
|
||||
Response response = await placeOrderWithHttpInfo(body);
|
||||
|
@ -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<User> 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<User> 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<User> 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<String> 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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user