Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sshehrozali/dart-swaggergen-client
Dart client-side code generated using Swagger Codegen and OpenAPI 3.0 specifications.
https://github.com/sshehrozali/dart-swaggergen-client
dart openapi3 swagger
Last synced: 10 days ago
JSON representation
Dart client-side code generated using Swagger Codegen and OpenAPI 3.0 specifications.
- Host: GitHub
- URL: https://github.com/sshehrozali/dart-swaggergen-client
- Owner: sshehrozali
- Created: 2022-06-23T09:17:30.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-06-23T09:20:24.000Z (over 2 years ago)
- Last Synced: 2024-12-08T16:08:26.997Z (2 months ago)
- Topics: dart, openapi3, swagger
- Language: Dart
- Homepage:
- Size: 16.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# swagger
This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.This Dart package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
- API version: 1.0.0
- Build package: io.swagger.codegen.languages.DartClientCodegen## Requirements
Dart 1.20.0 or later OR Flutter 0.0.20 or later
## Installation & Usage
### Github
If this Dart package is published to Github, please include the following in pubspec.yaml
```
name: swagger
version: 1.0.0
description: Swagger API client
dependencies:
swagger:
git: https://github.com//.git
version: 'any'
```### Local
To use the package in your local drive, please include the following in pubspec.yaml
```
dependencies:
swagger:
path: /path/to/swagger
```## Tests
TODO
## Getting Started
Please follow the [installation procedure](#installation--usage) and then run the following:
```dart
import 'package:swagger/api.dart';// TODO Configure OAuth2 access token for authorization: petstore_auth
//swagger.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN';var api_instance = new PetApi();
var body = new Pet(); // Pet | Pet object that needs to be added to the storetry {
api_instance.addPet(body);
} catch (e) {
print("Exception when calling PetApi->addPet: $e\n");
}```
## Documentation for API Endpoints
All URIs are relative to *https://petstore.swagger.io/v2*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*PetApi* | [**addPet**](docs//PetApi.md#addpet) | **POST** /pet | Add a new pet to the store
*PetApi* | [**deletePet**](docs//PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet
*PetApi* | [**findPetsByStatus**](docs//PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status
*PetApi* | [**findPetsByTags**](docs//PetApi.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags
*PetApi* | [**getPetById**](docs//PetApi.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID
*PetApi* | [**updatePet**](docs//PetApi.md#updatepet) | **PUT** /pet | Update an existing pet
*PetApi* | [**updatePetWithForm**](docs//PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data
*PetApi* | [**uploadFile**](docs//PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image
*StoreApi* | [**deleteOrder**](docs//StoreApi.md#deleteorder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID
*StoreApi* | [**getInventory**](docs//StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status
*StoreApi* | [**getOrderById**](docs//StoreApi.md#getorderbyid) | **GET** /store/order/{orderId} | Find purchase order by ID
*StoreApi* | [**placeOrder**](docs//StoreApi.md#placeorder) | **POST** /store/order | Place an order for a pet
*UserApi* | [**createUser**](docs//UserApi.md#createuser) | **POST** /user | Create user
*UserApi* | [**createUsersWithArrayInput**](docs//UserApi.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array
*UserApi* | [**createUsersWithListInput**](docs//UserApi.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array
*UserApi* | [**deleteUser**](docs//UserApi.md#deleteuser) | **DELETE** /user/{username} | Delete user
*UserApi* | [**getUserByName**](docs//UserApi.md#getuserbyname) | **GET** /user/{username} | Get user by user name
*UserApi* | [**loginUser**](docs//UserApi.md#loginuser) | **GET** /user/login | Logs user into the system
*UserApi* | [**logoutUser**](docs//UserApi.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session
*UserApi* | [**updateUser**](docs//UserApi.md#updateuser) | **PUT** /user/{username} | Updated user## Documentation For Models
- [ApiResponse](docs//ApiResponse.md)
- [Category](docs//Category.md)
- [Order](docs//Order.md)
- [Pet](docs//Pet.md)
- [Tag](docs//Tag.md)
- [User](docs//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/oauth/dialog
- **Scopes**:
- **write:pets**: modify pets in your account
- **read:pets**: read your pets## Author