# openapi This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. This Dart package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: 1.0.0 - Build package: org.openapitools.codegen.languages.DartClientCodegen ## Requirements Dart 2.0 or later ## Installation & Usage ### Github If this Dart package is published to Github, add the following dependency to your pubspec.yaml ``` dependencies: openapi: git: https://github.com/GIT_USER_ID/GIT_REPO_ID.git ``` ### Local To use the package in your local drive, add the following dependency to your pubspec.yaml ``` dependencies: openapi: path: /path/to/openapi ``` ## Tests TODO ## Getting Started Please follow the [installation procedure](#installation--usage) and then run the following: ```dart import 'package:openapi/api.dart'; // TODO Configure OAuth2 access token for authorization: petstore_auth //defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; var api_instance = PetApi(); var body = Pet(); // Pet | Pet object that needs to be added to the store try { api_instance.addPet(body); } catch (e) { print("Exception when calling PetApi->addPet: $e\n"); } ``` ## Documentation for API Endpoints All URIs are relative to *http://petstore.swagger.io/v2* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- *PetApi* | [**addPet**](doc//PetApi.md#addpet) | **POST** /pet | Add a new pet to the store *PetApi* | [**deletePet**](doc//PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet *PetApi* | [**findPetsByStatus**](doc//PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status *PetApi* | [**findPetsByTags**](doc//PetApi.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags *PetApi* | [**getPetById**](doc//PetApi.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID *PetApi* | [**updatePet**](doc//PetApi.md#updatepet) | **PUT** /pet | Update an existing pet *PetApi* | [**updatePetWithForm**](doc//PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data *PetApi* | [**uploadFile**](doc//PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image *StoreApi* | [**deleteOrder**](doc//StoreApi.md#deleteorder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID *StoreApi* | [**getInventory**](doc//StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status *StoreApi* | [**getOrderById**](doc//StoreApi.md#getorderbyid) | **GET** /store/order/{orderId} | Find purchase order by ID *StoreApi* | [**placeOrder**](doc//StoreApi.md#placeorder) | **POST** /store/order | Place an order for a pet *UserApi* | [**createUser**](doc//UserApi.md#createuser) | **POST** /user | Create user *UserApi* | [**createUsersWithArrayInput**](doc//UserApi.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array *UserApi* | [**createUsersWithListInput**](doc//UserApi.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array *UserApi* | [**deleteUser**](doc//UserApi.md#deleteuser) | **DELETE** /user/{username} | Delete user *UserApi* | [**getUserByName**](doc//UserApi.md#getuserbyname) | **GET** /user/{username} | Get user by user name *UserApi* | [**loginUser**](doc//UserApi.md#loginuser) | **GET** /user/login | Logs user into the system *UserApi* | [**logoutUser**](doc//UserApi.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session *UserApi* | [**updateUser**](doc//UserApi.md#updateuser) | **PUT** /user/{username} | Updated user ## Documentation For Models - [ApiResponse](doc//ApiResponse.md) - [Category](doc//Category.md) - [Order](doc//Order.md) - [Pet](doc//Pet.md) - [Tag](doc//Tag.md) - [User](doc//User.md) ## Documentation For Authorization ## api_key - **Type**: API key - **API key parameter name**: api_key - **Location**: HTTP header ## petstore_auth - **Type**: OAuth - **Flow**: implicit - **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog - **Scopes**: - **write:pets**: modify pets in your account - **read:pets**: read your pets ## Author