|
| 1 | +# openapi (EXPERIMENTAL) |
| 2 | +This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. |
| 3 | + |
| 4 | +This Dart package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: |
| 5 | + |
| 6 | +- API version: 1.0.0 |
| 7 | +- Generator version: 7.16.0-SNAPSHOT |
| 8 | +- Build package: org.openapitools.codegen.languages.DartDioClientCodegen |
| 9 | + |
| 10 | +## Requirements |
| 11 | + |
| 12 | +* Dart 2.15.0+ or Flutter 2.8.0+ |
| 13 | +* Dio 5.0.0+ (https://pub.dev/packages/dio) |
| 14 | +* timemachine option currently **DOES NOT** support sound null-safety and may not work |
| 15 | + |
| 16 | +## Installation & Usage |
| 17 | + |
| 18 | +### pub.dev |
| 19 | +To use the package from [pub.dev](https://pub.dev), please include the following in pubspec.yaml |
| 20 | +```yaml |
| 21 | +dependencies: |
| 22 | + openapi: 1.0.0 |
| 23 | +``` |
| 24 | +
|
| 25 | +### Github |
| 26 | +If this Dart package is published to Github, please include the following in pubspec.yaml |
| 27 | +```yaml |
| 28 | +dependencies: |
| 29 | + openapi: |
| 30 | + git: |
| 31 | + url: https://github.com/GIT_USER_ID/GIT_REPO_ID.git |
| 32 | + #ref: main |
| 33 | +``` |
| 34 | + |
| 35 | +### Local development |
| 36 | +To use the package from your local drive, please include the following in pubspec.yaml |
| 37 | +```yaml |
| 38 | +dependencies: |
| 39 | + openapi: |
| 40 | + path: /path/to/openapi |
| 41 | +``` |
| 42 | +
|
| 43 | +## Getting Started |
| 44 | +
|
| 45 | +Please follow the [installation procedure](#installation--usage) and then run the following: |
| 46 | +
|
| 47 | +```dart |
| 48 | +import 'package:openapi/openapi.dart'; |
| 49 | + |
| 50 | + |
| 51 | +final api = Openapi().getPetApi(); |
| 52 | +final Pet pet = ; // Pet | Pet object that needs to be added to the store |
| 53 | + |
| 54 | +try { |
| 55 | + final response = await api.addPet(pet); |
| 56 | + print(response); |
| 57 | +} catch on DioException (e) { |
| 58 | + print("Exception when calling PetApi->addPet: $e\n"); |
| 59 | +} |
| 60 | + |
| 61 | +``` |
| 62 | + |
| 63 | +## Documentation for API Endpoints |
| 64 | + |
| 65 | +All URIs are relative to *http://petstore.swagger.io/v2* |
| 66 | + |
| 67 | +Class | Method | HTTP request | Description |
| 68 | +------------ | ------------- | ------------- | ------------- |
| 69 | +[*PetApi*](doc/PetApi.md) | [**addPet**](doc/PetApi.md#addpet) | **POST** /pet | Add a new pet to the store |
| 70 | +[*PetApi*](doc/PetApi.md) | [**deletePet**](doc/PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet |
| 71 | +[*PetApi*](doc/PetApi.md) | [**findPetsByStatus**](doc/PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status |
| 72 | +[*PetApi*](doc/PetApi.md) | [**findPetsByTags**](doc/PetApi.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags |
| 73 | +[*PetApi*](doc/PetApi.md) | [**getPetById**](doc/PetApi.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID |
| 74 | +[*PetApi*](doc/PetApi.md) | [**updatePet**](doc/PetApi.md#updatepet) | **PUT** /pet | Update an existing pet |
| 75 | +[*PetApi*](doc/PetApi.md) | [**updatePetWithForm**](doc/PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data |
| 76 | +[*PetApi*](doc/PetApi.md) | [**uploadFile**](doc/PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image |
| 77 | +[*StoreApi*](doc/StoreApi.md) | [**deleteOrder**](doc/StoreApi.md#deleteorder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID |
| 78 | +[*StoreApi*](doc/StoreApi.md) | [**getInventory**](doc/StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status |
| 79 | +[*StoreApi*](doc/StoreApi.md) | [**getOrderById**](doc/StoreApi.md#getorderbyid) | **GET** /store/order/{orderId} | Find purchase order by ID |
| 80 | +[*StoreApi*](doc/StoreApi.md) | [**placeOrder**](doc/StoreApi.md#placeorder) | **POST** /store/order | Place an order for a pet |
| 81 | +[*UserApi*](doc/UserApi.md) | [**createUser**](doc/UserApi.md#createuser) | **POST** /user | Create user |
| 82 | +[*UserApi*](doc/UserApi.md) | [**createUsersWithArrayInput**](doc/UserApi.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array |
| 83 | +[*UserApi*](doc/UserApi.md) | [**createUsersWithListInput**](doc/UserApi.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array |
| 84 | +[*UserApi*](doc/UserApi.md) | [**deleteUser**](doc/UserApi.md#deleteuser) | **DELETE** /user/{username} | Delete user |
| 85 | +[*UserApi*](doc/UserApi.md) | [**getUserByName**](doc/UserApi.md#getuserbyname) | **GET** /user/{username} | Get user by user name |
| 86 | +[*UserApi*](doc/UserApi.md) | [**loginUser**](doc/UserApi.md#loginuser) | **GET** /user/login | Logs user into the system |
| 87 | +[*UserApi*](doc/UserApi.md) | [**logoutUser**](doc/UserApi.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session |
| 88 | +[*UserApi*](doc/UserApi.md) | [**updateUser**](doc/UserApi.md#updateuser) | **PUT** /user/{username} | Updated user |
| 89 | + |
| 90 | + |
| 91 | +## Documentation For Models |
| 92 | + |
| 93 | + - [ApiResponse](doc/ApiResponse.md) |
| 94 | + - [Category](doc/Category.md) |
| 95 | + - [Order](doc/Order.md) |
| 96 | + - [Pet](doc/Pet.md) |
| 97 | + - [Tag](doc/Tag.md) |
| 98 | + - [User](doc/User.md) |
| 99 | + |
| 100 | + |
| 101 | +## Documentation For Authorization |
| 102 | + |
| 103 | + |
| 104 | +Authentication schemes defined for the API: |
| 105 | +### petstore_auth |
| 106 | + |
| 107 | +- **Type**: OAuth |
| 108 | +- **Flow**: implicit |
| 109 | +- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog |
| 110 | +- **Scopes**: |
| 111 | + - **write:pets**: modify pets in your account |
| 112 | + - **read:pets**: read your pets |
| 113 | + |
| 114 | +### api_key |
| 115 | + |
| 116 | +- **Type**: API key |
| 117 | +- **API key parameter name**: api_key |
| 118 | +- **Location**: HTTP header |
| 119 | + |
| 120 | + |
| 121 | +## Author |
| 122 | + |
| 123 | + |
| 124 | + |
0 commit comments