forked from loafle/openapi-generator-original
[dart] Cleanup and OAS3 support (#8085)
* [dart] Cleanup and regnerate old/wrong tests and docs * docs path seems to be doc now in all dart generators * generated tests are very old and use wrong classes * [dart-dio] Improve formatting * [dart][dart-dio] Restructure tests to same layout * remove duplicate/old openapi sample for which there is no generation config * generate to `petstore_client_lib` for both generators * run generated tests as integration tests for dart2 even if empty - this makes it easier to find compile errors * [dart] Improve gitignore handling for Dart generators * globally ignore all dart related files that should not be commited * remove old ignores that are no longer valid * [dart][dart-dio] Add OAS3 generation and integration tests Dart2 doesn't compile, needs fixes. * [dart] Do not attempt to deserialize binary content from JSON fields Not sure if that case is ever relevant but for now there doesn't seem to be a better option. * [dart] Fix integration tests for OAS3 petstore Some POST operations now return 200 with content. * [dart] Generate Petstore Fake API but don't add to integration tests yet Explicitly not adding the new integration tests to the master POM. They do not work but having them allows for quickly iterating on open issues without breaking existing basic OAS2/OAS3 petstore examples. Instead they should be run manually until everything is fixed.
This commit is contained in:
parent
ed72843668
commit
751ffad8db
14
.gitignore
vendored
14
.gitignore
vendored
@ -234,11 +234,15 @@ samples/client/petstore/erlang-proper/rebar.lock
|
||||
samples/server/petstore/erlang-server/_build/
|
||||
samples/server/petstore/erlang-server/rebar.lock
|
||||
|
||||
# dart
|
||||
samples/client/petstore/dart/petstore/packages
|
||||
samples/client/petstore/dart/flutter_petstore/test/packages
|
||||
samples/client/petstore/dart/petstore/test/packages
|
||||
**/.dart_tool
|
||||
# Dart
|
||||
**/dart*/**/.dart_tool
|
||||
**/dart*/**/.packages
|
||||
**/dart*/**/pubspec.lock
|
||||
# Dart dio
|
||||
**/dart*/**/*.g.dart
|
||||
# Dart jaguar
|
||||
**/dart*/**/*.jser.dart
|
||||
**/dart*/**/*.jretro.dart
|
||||
|
||||
# JS
|
||||
samples/client/petstore/javascript-es6/package-lock.json
|
||||
|
6
bin/configs/dart-dio-petstore-client-lib-fake.yaml
Normal file
6
bin/configs/dart-dio-petstore-client-lib-fake.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
generatorName: dart-dio
|
||||
outputDir: samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/dart-dio
|
||||
additionalProperties:
|
||||
hideGenerationTimestamp: "true"
|
@ -1,5 +1,5 @@
|
||||
generatorName: dart-dio
|
||||
outputDir: samples/client/petstore/dart-dio
|
||||
outputDir: samples/client/petstore/dart-dio/petstore_client_lib
|
||||
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/dart-dio
|
||||
additionalProperties:
|
6
bin/configs/dart-dio-petstore-client-lib.yaml
Normal file
6
bin/configs/dart-dio-petstore-client-lib.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
generatorName: dart-dio
|
||||
outputDir: samples/openapi3/client/petstore/dart-dio/petstore_client_lib
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/dart-dio
|
||||
additionalProperties:
|
||||
hideGenerationTimestamp: "true"
|
6
bin/configs/dart-petstore-client-lib-fake.yaml
Normal file
6
bin/configs/dart-petstore-client-lib-fake.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
generatorName: dart
|
||||
outputDir: samples/openapi3/client/petstore/dart2/petstore_client_lib_fake
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/dart2
|
||||
additionalProperties:
|
||||
hideGenerationTimestamp: "true"
|
6
bin/configs/dart-petstore-client-lib.yaml
Normal file
6
bin/configs/dart-petstore-client-lib.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
generatorName: dart
|
||||
outputDir: samples/openapi3/client/petstore/dart2/petstore_client_lib
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/dart2
|
||||
additionalProperties:
|
||||
hideGenerationTimestamp: "true"
|
@ -8,12 +8,12 @@ abstract class {{classname}} implements Built<{{classname}}, {{classname}}Builde
|
||||
{{#vars}}
|
||||
{{#description}}/* {{{description}}} */{{/description}}
|
||||
{{#isNullable}}
|
||||
@nullable
|
||||
@nullable
|
||||
{{/isNullable}}
|
||||
@BuiltValueField(wireName: r'{{baseName}}')
|
||||
{{#isEnum}}{{classname}}{{{nameInCamelCase}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}} get {{name}};
|
||||
{{#allowableValues}}
|
||||
{{#min}} // range from {{min}} to {{max}}{{/min}}//{{^min}}enum {{name}}Enum { {{#values}} {{.}}, {{/values}} };{{/min}}
|
||||
{{#min}}// range from {{min}} to {{max}}{{/min}}//{{^min}} enum {{name}}Enum { {{#values}} {{.}}, {{/values}} };{{/min}}
|
||||
{{/allowableValues}}
|
||||
{{/vars}}
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
{{#models}}
|
||||
{{#model}}
|
||||
{{#imports}}
|
||||
import '{{.}}';
|
||||
import '{{.}}';
|
||||
{{/imports}}
|
||||
{{#isEnum}}{{>enum}}{{/isEnum}}{{^isEnum}}{{>class}}{{/isEnum}}
|
||||
{{#isEnum}}{{>enum}}{{/isEnum}}{{^isEnum}}{{>class}}{{/isEnum}}
|
||||
{{/model}}
|
||||
{{/models}}
|
@ -152,7 +152,12 @@ class {{{classname}}} {
|
||||
{{/items.isArray}}
|
||||
{{/isMap}}
|
||||
{{^isMap}}
|
||||
{{#isBinary}}
|
||||
{{{name}}}: null, // No support for decoding binary content from JSON
|
||||
{{/isBinary}}
|
||||
{{^isBinary}}
|
||||
{{{name}}}: {{{complexType}}}.fromJson(json['{{{baseName}}}']),
|
||||
{{/isBinary}}
|
||||
{{/isMap}}
|
||||
{{/isArray}}
|
||||
{{/complexType}}
|
||||
|
6
pom.xml
6
pom.xml
@ -1349,8 +1349,12 @@
|
||||
<module>samples/client/petstore/javascript-promise-es6</module>
|
||||
<module>samples/server/petstore/go-api-server</module>
|
||||
<module>samples/server/petstore/go-gin-api-server</module>
|
||||
<module>samples/client/petstore/dart2/petstore_client_lib</module>
|
||||
<module>samples/client/petstore/dart2/petstore</module>
|
||||
<module>samples/client/petstore/dart-dio</module>
|
||||
<module>samples/openapi3/client/petstore/dart2/petstore_client_lib</module>
|
||||
<module>samples/openapi3/client/petstore/dart2/petstore</module>
|
||||
<module>samples/client/petstore/dart-dio/petstore_client_lib</module>
|
||||
<module>samples/openapi3/client/petstore/dart-dio/petstore_client_lib</module>
|
||||
<module>samples/client/petstore/dart-jaguar/openapi</module>
|
||||
<module>samples/client/petstore/dart-jaguar/flutter_petstore/openapi</module>
|
||||
</modules>
|
||||
|
@ -27,9 +27,6 @@ doc/api/
|
||||
# (Library packages only! Remove pattern if developing an application package)
|
||||
pubspec.lock
|
||||
|
||||
# Don't commit *.g.dart files which are genrated during integration tests
|
||||
lib/**/*.g.dart
|
||||
|
||||
# Don’t commit files and directories created by other development environments.
|
||||
# For example, if your development environment creates any of the following files,
|
||||
# consider putting them in a global ignore file:
|
@ -1,3 +1,4 @@
|
||||
.gitignore
|
||||
README.md
|
||||
analysis_options.yaml
|
||||
doc/ApiResponse.md
|
@ -1,4 +1,4 @@
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
|
||||
part 'api_response.g.dart';
|
||||
@ -6,15 +6,15 @@ part 'api_response.g.dart';
|
||||
abstract class ApiResponse implements Built<ApiResponse, ApiResponseBuilder> {
|
||||
|
||||
|
||||
@nullable
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'code')
|
||||
int get code;
|
||||
|
||||
@nullable
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'type')
|
||||
String get type;
|
||||
|
||||
@nullable
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'message')
|
||||
String get message;
|
||||
|
@ -1,4 +1,4 @@
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
|
||||
part 'category.g.dart';
|
||||
@ -6,11 +6,11 @@ part 'category.g.dart';
|
||||
abstract class Category implements Built<Category, CategoryBuilder> {
|
||||
|
||||
|
||||
@nullable
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'id')
|
||||
int get id;
|
||||
|
||||
@nullable
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'name')
|
||||
String get name;
|
||||
|
@ -1,5 +1,5 @@
|
||||
import 'package:built_collection/built_collection.dart';
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_collection/built_collection.dart';
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
|
||||
part 'order.g.dart';
|
||||
@ -7,28 +7,28 @@ part 'order.g.dart';
|
||||
abstract class Order implements Built<Order, OrderBuilder> {
|
||||
|
||||
|
||||
@nullable
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'id')
|
||||
int get id;
|
||||
|
||||
@nullable
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'petId')
|
||||
int get petId;
|
||||
|
||||
@nullable
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'quantity')
|
||||
int get quantity;
|
||||
|
||||
@nullable
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'shipDate')
|
||||
DateTime get shipDate;
|
||||
/* Order Status */
|
||||
@nullable
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'status')
|
||||
OrderStatus get status;
|
||||
//enum statusEnum { placed, approved, delivered, };
|
||||
// enum statusEnum { placed, approved, delivered, };
|
||||
|
||||
@nullable
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'complete')
|
||||
bool get complete;
|
||||
|
@ -1,7 +1,7 @@
|
||||
import 'package:openapi/model/tag.dart';
|
||||
import 'package:built_collection/built_collection.dart';
|
||||
import 'package:openapi/model/category.dart';
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:openapi/model/tag.dart';
|
||||
import 'package:built_collection/built_collection.dart';
|
||||
import 'package:openapi/model/category.dart';
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
|
||||
part 'pet.g.dart';
|
||||
@ -9,30 +9,30 @@ part 'pet.g.dart';
|
||||
abstract class Pet implements Built<Pet, PetBuilder> {
|
||||
|
||||
|
||||
@nullable
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'id')
|
||||
int get id;
|
||||
|
||||
@nullable
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'category')
|
||||
Category get category;
|
||||
|
||||
@nullable
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'name')
|
||||
String get name;
|
||||
|
||||
@nullable
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'photoUrls')
|
||||
BuiltList<String> get photoUrls;
|
||||
|
||||
@nullable
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'tags')
|
||||
BuiltList<Tag> get tags;
|
||||
/* pet status in the store */
|
||||
@nullable
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'status')
|
||||
PetStatus get status;
|
||||
//enum statusEnum { available, pending, sold, };
|
||||
// enum statusEnum { available, pending, sold, };
|
||||
|
||||
// Boilerplate code needed to wire-up generated code
|
||||
Pet._();
|
@ -1,4 +1,4 @@
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
|
||||
part 'tag.g.dart';
|
||||
@ -6,11 +6,11 @@ part 'tag.g.dart';
|
||||
abstract class Tag implements Built<Tag, TagBuilder> {
|
||||
|
||||
|
||||
@nullable
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'id')
|
||||
int get id;
|
||||
|
||||
@nullable
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'name')
|
||||
String get name;
|
||||
|
@ -1,4 +1,4 @@
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
|
||||
part 'user.g.dart';
|
||||
@ -6,35 +6,35 @@ part 'user.g.dart';
|
||||
abstract class User implements Built<User, UserBuilder> {
|
||||
|
||||
|
||||
@nullable
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'id')
|
||||
int get id;
|
||||
|
||||
@nullable
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'username')
|
||||
String get username;
|
||||
|
||||
@nullable
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'firstName')
|
||||
String get firstName;
|
||||
|
||||
@nullable
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'lastName')
|
||||
String get lastName;
|
||||
|
||||
@nullable
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'email')
|
||||
String get email;
|
||||
|
||||
@nullable
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'password')
|
||||
String get password;
|
||||
|
||||
@nullable
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'phone')
|
||||
String get phone;
|
||||
/* User Status */
|
||||
@nullable
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'userStatus')
|
||||
int get userStatus;
|
||||
|
88
samples/client/petstore/dart-dio/petstore_client_lib/pom.xml
Normal file
88
samples/client/petstore/dart-dio/petstore_client_lib/pom.xml
Normal file
@ -0,0 +1,88 @@
|
||||
<project>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>DartDioPetstoreClientLibOAS2Tests</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<name>DartDio Petstore Client Lib OAS2</name>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>copy-dependencies</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>${project.build.directory}</outputDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>exec-maven-plugin</artifactId>
|
||||
<version>1.2.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>export-dartfmt</id>
|
||||
<phase>pre-install-test</phase>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<executable>export</executable>
|
||||
<arguments>
|
||||
<argument>DART_FMT_PATH=/usr/local/bin/dartfmt</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>pub-get</id>
|
||||
<phase>pre-integration-test</phase>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<executable>pub</executable>
|
||||
<arguments>
|
||||
<argument>get</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>pub-run-build-runner</id>
|
||||
<phase>pre-integration-test</phase>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<executable>pub</executable>
|
||||
<arguments>
|
||||
<argument>run</argument>
|
||||
<argument>build_runner</argument>
|
||||
<argument>build</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>pub-test</id>
|
||||
<phase>integration-test</phase>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<executable>pub</executable>
|
||||
<arguments>
|
||||
<argument>run</argument>
|
||||
<argument>test</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
@ -1,379 +0,0 @@
|
||||
# openapi.api.PetApi
|
||||
|
||||
## Load the API package
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
```
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**addPet**](PetApi.md#addPet) | **Post** /pet | Add a new pet to the store
|
||||
[**deletePet**](PetApi.md#deletePet) | **Delete** /pet/:petId | Deletes a pet
|
||||
[**findPetsByStatus**](PetApi.md#findPetsByStatus) | **Get** /pet/findByStatus | Finds Pets by status
|
||||
[**findPetsByTags**](PetApi.md#findPetsByTags) | **Get** /pet/findByTags | Finds Pets by tags
|
||||
[**getPetById**](PetApi.md#getPetById) | **Get** /pet/:petId | Find pet by ID
|
||||
[**updatePet**](PetApi.md#updatePet) | **Put** /pet | Update an existing pet
|
||||
[**updatePetWithForm**](PetApi.md#updatePetWithForm) | **Post** /pet/:petId | Updates a pet in the store with form data
|
||||
[**uploadFile**](PetApi.md#uploadFile) | **Post** /pet/:petId/uploadImage | uploads an image
|
||||
|
||||
|
||||
# **addPet**
|
||||
> addPet(body)
|
||||
|
||||
Add a new pet to the store
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
// TODO Configure OAuth2 access token for authorization: petstore_auth
|
||||
//openapi.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 store
|
||||
|
||||
try {
|
||||
api_instance.addPet(body);
|
||||
} catch (e) {
|
||||
print("Exception when calling PetApi->addPet: $e\n");
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json, application/xml
|
||||
- **Accept**: Not defined
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **deletePet**
|
||||
> deletePet(petId, apiKey)
|
||||
|
||||
Deletes a pet
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
// TODO Configure OAuth2 access token for authorization: petstore_auth
|
||||
//openapi.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
var api_instance = new PetApi();
|
||||
var petId = 789; // int | Pet id to delete
|
||||
var apiKey = apiKey_example; // String |
|
||||
|
||||
try {
|
||||
api_instance.deletePet(petId, apiKey);
|
||||
} catch (e) {
|
||||
print("Exception when calling PetApi->deletePet: $e\n");
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **int**| Pet id to delete | [default to null]
|
||||
**apiKey** | **String**| | [optional] [default to null]
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **findPetsByStatus**
|
||||
> List<Pet> findPetsByStatus(status)
|
||||
|
||||
Finds Pets by status
|
||||
|
||||
Multiple status values can be provided with comma separated strings
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
// TODO Configure OAuth2 access token for authorization: petstore_auth
|
||||
//openapi.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
var api_instance = new PetApi();
|
||||
var status = []; // List<String> | Status values that need to be considered for filter
|
||||
|
||||
try {
|
||||
var result = api_instance.findPetsByStatus(status);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print("Exception when calling PetApi->findPetsByStatus: $e\n");
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [default to const []]
|
||||
|
||||
### Return type
|
||||
|
||||
[**List<Pet>**](Pet.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **findPetsByTags**
|
||||
> List<Pet> findPetsByTags(tags)
|
||||
|
||||
Finds Pets by tags
|
||||
|
||||
Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
// TODO Configure OAuth2 access token for authorization: petstore_auth
|
||||
//openapi.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
var api_instance = new PetApi();
|
||||
var tags = []; // List<String> | Tags to filter by
|
||||
|
||||
try {
|
||||
var result = api_instance.findPetsByTags(tags);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print("Exception when calling PetApi->findPetsByTags: $e\n");
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**tags** | [**List<String>**](String.md)| Tags to filter by | [default to const []]
|
||||
|
||||
### Return type
|
||||
|
||||
[**List<Pet>**](Pet.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **getPetById**
|
||||
> Pet getPetById(petId)
|
||||
|
||||
Find pet by ID
|
||||
|
||||
Returns a single pet
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
// TODO Configure API key authorization: api_key
|
||||
//openapi.api.Configuration.apiKey{'api_key'} = 'YOUR_API_KEY';
|
||||
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
//openapi.api.Configuration.apiKeyPrefix{'api_key'} = "Bearer";
|
||||
|
||||
var api_instance = new PetApi();
|
||||
var petId = 789; // int | ID of pet to return
|
||||
|
||||
try {
|
||||
var result = api_instance.getPetById(petId);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print("Exception when calling PetApi->getPetById: $e\n");
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **int**| ID of pet to return | [default to null]
|
||||
|
||||
### Return type
|
||||
|
||||
[**Pet**](Pet.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[api_key](../README.md#api_key)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **updatePet**
|
||||
> updatePet(body)
|
||||
|
||||
Update an existing pet
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
// TODO Configure OAuth2 access token for authorization: petstore_auth
|
||||
//openapi.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 store
|
||||
|
||||
try {
|
||||
api_instance.updatePet(body);
|
||||
} catch (e) {
|
||||
print("Exception when calling PetApi->updatePet: $e\n");
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json, application/xml
|
||||
- **Accept**: Not defined
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **updatePetWithForm**
|
||||
> updatePetWithForm(petId, name, status)
|
||||
|
||||
Updates a pet in the store with form data
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
// TODO Configure OAuth2 access token for authorization: petstore_auth
|
||||
//openapi.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
var api_instance = new PetApi();
|
||||
var petId = 789; // int | ID of pet that needs to be updated
|
||||
var name = name_example; // String | Updated name of the pet
|
||||
var status = status_example; // String | Updated status of the pet
|
||||
|
||||
try {
|
||||
api_instance.updatePetWithForm(petId, name, status);
|
||||
} catch (e) {
|
||||
print("Exception when calling PetApi->updatePetWithForm: $e\n");
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **int**| ID of pet that needs to be updated | [default to null]
|
||||
**name** | **String**| Updated name of the pet | [optional] [default to null]
|
||||
**status** | **String**| Updated status of the pet | [optional] [default to null]
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/x-www-form-urlencoded
|
||||
- **Accept**: Not defined
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **uploadFile**
|
||||
> ApiResponse uploadFile(petId, additionalMetadata, file)
|
||||
|
||||
uploads an image
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
// TODO Configure OAuth2 access token for authorization: petstore_auth
|
||||
//openapi.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
var api_instance = new PetApi();
|
||||
var petId = 789; // int | ID of pet to update
|
||||
var additionalMetadata = additionalMetadata_example; // String | Additional data to pass to server
|
||||
var file = BINARY_DATA_HERE; // MultipartFile | file to upload
|
||||
|
||||
try {
|
||||
var result = api_instance.uploadFile(petId, additionalMetadata, file);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print("Exception when calling PetApi->uploadFile: $e\n");
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **int**| ID of pet to update | [default to null]
|
||||
**additionalMetadata** | **String**| Additional data to pass to server | [optional] [default to null]
|
||||
**file** | **MultipartFile****MultipartFile**| file to upload | [optional] [default to null]
|
||||
|
||||
### Return type
|
||||
|
||||
[**ApiResponse**](ApiResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: multipart/form-data
|
||||
- **Accept**: application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
@ -1,186 +0,0 @@
|
||||
# openapi.api.StoreApi
|
||||
|
||||
## Load the API package
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
```
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**deleteOrder**](StoreApi.md#deleteOrder) | **Delete** /store/order/:orderId | Delete purchase order by ID
|
||||
[**getInventory**](StoreApi.md#getInventory) | **Get** /store/inventory | Returns pet inventories by status
|
||||
[**getOrderById**](StoreApi.md#getOrderById) | **Get** /store/order/:orderId | Find purchase order by ID
|
||||
[**placeOrder**](StoreApi.md#placeOrder) | **Post** /store/order | Place an order for a pet
|
||||
|
||||
|
||||
# **deleteOrder**
|
||||
> deleteOrder(orderId)
|
||||
|
||||
Delete purchase order by ID
|
||||
|
||||
For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
|
||||
var api_instance = new StoreApi();
|
||||
var orderId = orderId_example; // String | ID of the order that needs to be deleted
|
||||
|
||||
try {
|
||||
api_instance.deleteOrder(orderId);
|
||||
} catch (e) {
|
||||
print("Exception when calling StoreApi->deleteOrder: $e\n");
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**orderId** | **String**| ID of the order that needs to be deleted | [default to null]
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **getInventory**
|
||||
> Map<String, int> getInventory()
|
||||
|
||||
Returns pet inventories by status
|
||||
|
||||
Returns a map of status codes to quantities
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
// TODO Configure API key authorization: api_key
|
||||
//openapi.api.Configuration.apiKey{'api_key'} = 'YOUR_API_KEY';
|
||||
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
//openapi.api.Configuration.apiKeyPrefix{'api_key'} = "Bearer";
|
||||
|
||||
var api_instance = new StoreApi();
|
||||
|
||||
try {
|
||||
var result = api_instance.getInventory();
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print("Exception when calling StoreApi->getInventory: $e\n");
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
**Map<String, int>**
|
||||
|
||||
### Authorization
|
||||
|
||||
[api_key](../README.md#api_key)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **getOrderById**
|
||||
> Order getOrderById(orderId)
|
||||
|
||||
Find purchase order by ID
|
||||
|
||||
For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
|
||||
var api_instance = new StoreApi();
|
||||
var orderId = 789; // int | ID of pet that needs to be fetched
|
||||
|
||||
try {
|
||||
var result = api_instance.getOrderById(orderId);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print("Exception when calling StoreApi->getOrderById: $e\n");
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**orderId** | **int**| ID of pet that needs to be fetched | [default to null]
|
||||
|
||||
### Return type
|
||||
|
||||
[**Order**](Order.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **placeOrder**
|
||||
> Order placeOrder(body)
|
||||
|
||||
Place an order for a pet
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
|
||||
var api_instance = new StoreApi();
|
||||
var body = new Order(); // Order | order placed for purchasing the pet
|
||||
|
||||
try {
|
||||
var result = api_instance.placeOrder(body);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print("Exception when calling StoreApi->placeOrder: $e\n");
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**Order**](Order.md)| order placed for purchasing the pet |
|
||||
|
||||
### Return type
|
||||
|
||||
[**Order**](Order.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
@ -3,7 +3,7 @@ import 'package:test/test.dart';
|
||||
|
||||
// tests for ApiResponse
|
||||
void main() {
|
||||
var instance = new Pet();
|
||||
var instance = new ApiResponse();
|
||||
|
||||
group('test ApiResponse', () {
|
||||
// int code (default value: null)
|
||||
|
@ -3,7 +3,7 @@ import 'package:test/test.dart';
|
||||
|
||||
// tests for Category
|
||||
void main() {
|
||||
var instance = new Pet();
|
||||
var instance = new Category();
|
||||
|
||||
group('test Category', () {
|
||||
// int id (default value: null)
|
||||
|
@ -3,7 +3,7 @@ import 'package:test/test.dart';
|
||||
|
||||
// tests for Order
|
||||
void main() {
|
||||
var instance = new Pet();
|
||||
var instance = new Order();
|
||||
|
||||
group('test Order', () {
|
||||
// int id (default value: null)
|
||||
|
@ -9,14 +9,14 @@ void main() {
|
||||
group('tests for PetApi', () {
|
||||
// Add a new pet to the store
|
||||
//
|
||||
//Future addPet(Pet body) async
|
||||
//Future addPet(Pet body) async
|
||||
test('test addPet', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// Deletes a pet
|
||||
//
|
||||
//Future deletePet(int petId, { String apiKey }) async
|
||||
//Future deletePet(int petId, { String apiKey }) async
|
||||
test('test deletePet', () async {
|
||||
// TODO
|
||||
});
|
||||
@ -25,7 +25,7 @@ void main() {
|
||||
//
|
||||
// Multiple status values can be provided with comma separated strings
|
||||
//
|
||||
//Future<List<Pet>> findPetsByStatus(List<String> status) async
|
||||
//Future<List<Pet>> findPetsByStatus(List<String> status) async
|
||||
test('test findPetsByStatus', () async {
|
||||
// TODO
|
||||
});
|
||||
@ -34,7 +34,7 @@ void main() {
|
||||
//
|
||||
// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
//
|
||||
//Future<List<Pet>> findPetsByTags(List<String> tags) async
|
||||
//Future<List<Pet>> findPetsByTags(List<String> tags) async
|
||||
test('test findPetsByTags', () async {
|
||||
// TODO
|
||||
});
|
||||
@ -43,28 +43,28 @@ void main() {
|
||||
//
|
||||
// Returns a single pet
|
||||
//
|
||||
//Future<Pet> getPetById(int petId) async
|
||||
//Future<Pet> getPetById(int petId) async
|
||||
test('test getPetById', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// Update an existing pet
|
||||
//
|
||||
//Future updatePet(Pet body) async
|
||||
//Future updatePet(Pet body) async
|
||||
test('test updatePet', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// Updates a pet in the store with form data
|
||||
//
|
||||
//Future updatePetWithForm(int petId, { String name, String status }) async
|
||||
//Future updatePetWithForm(int petId, { String name, String status }) async
|
||||
test('test updatePetWithForm', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// uploads an image
|
||||
//
|
||||
//Future<ApiResponse> uploadFile(int petId, { String additionalMetadata, MultipartFile file }) async
|
||||
//Future<ApiResponse> uploadFile(int petId, { String additionalMetadata, MultipartFile file }) async
|
||||
test('test uploadFile', () async {
|
||||
// TODO
|
||||
});
|
||||
|
@ -11,7 +11,7 @@ void main() {
|
||||
//
|
||||
// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
//
|
||||
//Future deleteOrder(String orderId) async
|
||||
//Future deleteOrder(String orderId) async
|
||||
test('test deleteOrder', () async {
|
||||
// TODO
|
||||
});
|
||||
@ -20,7 +20,7 @@ void main() {
|
||||
//
|
||||
// Returns a map of status codes to quantities
|
||||
//
|
||||
//Future<Map<String, int>> getInventory() async
|
||||
//Future<Map<String, int>> getInventory() async
|
||||
test('test getInventory', () async {
|
||||
// TODO
|
||||
});
|
||||
@ -29,14 +29,14 @@ void main() {
|
||||
//
|
||||
// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
//
|
||||
//Future<Order> getOrderById(int orderId) async
|
||||
//Future<Order> getOrderById(int orderId) async
|
||||
test('test getOrderById', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// Place an order for a pet
|
||||
//
|
||||
//Future<Order> placeOrder(Order body) async
|
||||
//Future<Order> placeOrder(Order body) async
|
||||
test('test placeOrder', () async {
|
||||
// TODO
|
||||
});
|
||||
|
@ -3,7 +3,7 @@ import 'package:test/test.dart';
|
||||
|
||||
// tests for Tag
|
||||
void main() {
|
||||
var instance = new Pet();
|
||||
var instance = new Tag();
|
||||
|
||||
group('test Tag', () {
|
||||
// int id (default value: null)
|
||||
|
@ -11,21 +11,21 @@ void main() {
|
||||
//
|
||||
// This can only be done by the logged in user.
|
||||
//
|
||||
//Future createUser(User body) async
|
||||
//Future createUser(User body) async
|
||||
test('test createUser', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// Creates list of users with given input array
|
||||
//
|
||||
//Future createUsersWithArrayInput(List<User> body) async
|
||||
//Future createUsersWithArrayInput(List<User> body) async
|
||||
test('test createUsersWithArrayInput', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// Creates list of users with given input array
|
||||
//
|
||||
//Future createUsersWithListInput(List<User> body) async
|
||||
//Future createUsersWithListInput(List<User> body) async
|
||||
test('test createUsersWithListInput', () async {
|
||||
// TODO
|
||||
});
|
||||
@ -34,28 +34,28 @@ void main() {
|
||||
//
|
||||
// This can only be done by the logged in user.
|
||||
//
|
||||
//Future deleteUser(String username) async
|
||||
//Future deleteUser(String username) async
|
||||
test('test deleteUser', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// Get user by user name
|
||||
//
|
||||
//Future<User> getUserByName(String username) async
|
||||
//Future<User> getUserByName(String username) async
|
||||
test('test getUserByName', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// Logs user into the system
|
||||
//
|
||||
//Future<String> loginUser(String username, String password) async
|
||||
//Future<String> loginUser(String username, String password) async
|
||||
test('test loginUser', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// Logs out current logged in user session
|
||||
//
|
||||
//Future logoutUser() async
|
||||
//Future logoutUser() async
|
||||
test('test logoutUser', () async {
|
||||
// TODO
|
||||
});
|
||||
@ -64,7 +64,7 @@ void main() {
|
||||
//
|
||||
// This can only be done by the logged in user.
|
||||
//
|
||||
//Future updateUser(String username, User body) async
|
||||
//Future updateUser(String username, User body) async
|
||||
test('test updateUser', () async {
|
||||
// TODO
|
||||
});
|
||||
|
@ -3,7 +3,7 @@ import 'package:test/test.dart';
|
||||
|
||||
// tests for User
|
||||
void main() {
|
||||
var instance = new Pet();
|
||||
var instance = new User();
|
||||
|
||||
group('test User', () {
|
||||
// int id (default value: null)
|
||||
|
@ -1,20 +0,0 @@
|
||||
# openapi.model.Pet
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **int** | | [optional] [default to null]
|
||||
**category** | [**Category**](Category.md) | | [optional] [default to null]
|
||||
**name** | **String** | | [default to null]
|
||||
**photoUrls** | **List<String>** | | [default to const []]
|
||||
**tags** | [**List<Tag>**](Tag.md) | | [optional] [default to const []]
|
||||
**status** | **String** | pet status in the store | [optional] [default to null]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -1,379 +0,0 @@
|
||||
# openapi.api.PetApi
|
||||
|
||||
## Load the API package
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
```
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**addPet**](PetApi.md#addPet) | **Post** /pet | Add a new pet to the store
|
||||
[**deletePet**](PetApi.md#deletePet) | **Delete** /pet/:petId | Deletes a pet
|
||||
[**findPetsByStatus**](PetApi.md#findPetsByStatus) | **Get** /pet/findByStatus | Finds Pets by status
|
||||
[**findPetsByTags**](PetApi.md#findPetsByTags) | **Get** /pet/findByTags | Finds Pets by tags
|
||||
[**getPetById**](PetApi.md#getPetById) | **Get** /pet/:petId | Find pet by ID
|
||||
[**updatePet**](PetApi.md#updatePet) | **Put** /pet | Update an existing pet
|
||||
[**updatePetWithForm**](PetApi.md#updatePetWithForm) | **Post** /pet/:petId | Updates a pet in the store with form data
|
||||
[**uploadFile**](PetApi.md#uploadFile) | **Post** /pet/:petId/uploadImage | uploads an image
|
||||
|
||||
|
||||
# **addPet**
|
||||
> addPet(body)
|
||||
|
||||
Add a new pet to the store
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
// TODO Configure OAuth2 access token for authorization: petstore_auth
|
||||
//openapi.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 store
|
||||
|
||||
try {
|
||||
api_instance.addPet(body);
|
||||
} catch (e) {
|
||||
print("Exception when calling PetApi->addPet: $e\n");
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json, application/xml
|
||||
- **Accept**: Not defined
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **deletePet**
|
||||
> deletePet(petId, apiKey)
|
||||
|
||||
Deletes a pet
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
// TODO Configure OAuth2 access token for authorization: petstore_auth
|
||||
//openapi.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
var api_instance = new PetApi();
|
||||
var petId = 789; // int | Pet id to delete
|
||||
var apiKey = apiKey_example; // String |
|
||||
|
||||
try {
|
||||
api_instance.deletePet(petId, apiKey);
|
||||
} catch (e) {
|
||||
print("Exception when calling PetApi->deletePet: $e\n");
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **int**| Pet id to delete | [default to null]
|
||||
**apiKey** | **String**| | [optional] [default to null]
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **findPetsByStatus**
|
||||
> List<Pet> findPetsByStatus(status)
|
||||
|
||||
Finds Pets by status
|
||||
|
||||
Multiple status values can be provided with comma separated strings
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
// TODO Configure OAuth2 access token for authorization: petstore_auth
|
||||
//openapi.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
var api_instance = new PetApi();
|
||||
var status = []; // List<String> | Status values that need to be considered for filter
|
||||
|
||||
try {
|
||||
var result = api_instance.findPetsByStatus(status);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print("Exception when calling PetApi->findPetsByStatus: $e\n");
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [default to const []]
|
||||
|
||||
### Return type
|
||||
|
||||
[**List<Pet>**](Pet.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **findPetsByTags**
|
||||
> List<Pet> findPetsByTags(tags)
|
||||
|
||||
Finds Pets by tags
|
||||
|
||||
Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
// TODO Configure OAuth2 access token for authorization: petstore_auth
|
||||
//openapi.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
var api_instance = new PetApi();
|
||||
var tags = []; // List<String> | Tags to filter by
|
||||
|
||||
try {
|
||||
var result = api_instance.findPetsByTags(tags);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print("Exception when calling PetApi->findPetsByTags: $e\n");
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**tags** | [**List<String>**](String.md)| Tags to filter by | [default to const []]
|
||||
|
||||
### Return type
|
||||
|
||||
[**List<Pet>**](Pet.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **getPetById**
|
||||
> Pet getPetById(petId)
|
||||
|
||||
Find pet by ID
|
||||
|
||||
Returns a single pet
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
// TODO Configure API key authorization: api_key
|
||||
//openapi.api.Configuration.apiKey{'api_key'} = 'YOUR_API_KEY';
|
||||
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
//openapi.api.Configuration.apiKeyPrefix{'api_key'} = "Bearer";
|
||||
|
||||
var api_instance = new PetApi();
|
||||
var petId = 789; // int | ID of pet to return
|
||||
|
||||
try {
|
||||
var result = api_instance.getPetById(petId);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print("Exception when calling PetApi->getPetById: $e\n");
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **int**| ID of pet to return | [default to null]
|
||||
|
||||
### Return type
|
||||
|
||||
[**Pet**](Pet.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[api_key](../README.md#api_key)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **updatePet**
|
||||
> updatePet(body)
|
||||
|
||||
Update an existing pet
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
// TODO Configure OAuth2 access token for authorization: petstore_auth
|
||||
//openapi.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 store
|
||||
|
||||
try {
|
||||
api_instance.updatePet(body);
|
||||
} catch (e) {
|
||||
print("Exception when calling PetApi->updatePet: $e\n");
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json, application/xml
|
||||
- **Accept**: Not defined
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **updatePetWithForm**
|
||||
> updatePetWithForm(petId, name, status)
|
||||
|
||||
Updates a pet in the store with form data
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
// TODO Configure OAuth2 access token for authorization: petstore_auth
|
||||
//openapi.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
var api_instance = new PetApi();
|
||||
var petId = 789; // int | ID of pet that needs to be updated
|
||||
var name = name_example; // String | Updated name of the pet
|
||||
var status = status_example; // String | Updated status of the pet
|
||||
|
||||
try {
|
||||
api_instance.updatePetWithForm(petId, name, status);
|
||||
} catch (e) {
|
||||
print("Exception when calling PetApi->updatePetWithForm: $e\n");
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **int**| ID of pet that needs to be updated | [default to null]
|
||||
**name** | **String**| Updated name of the pet | [optional] [default to null]
|
||||
**status** | **String**| Updated status of the pet | [optional] [default to null]
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/x-www-form-urlencoded
|
||||
- **Accept**: Not defined
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **uploadFile**
|
||||
> ApiResponse uploadFile(petId, additionalMetadata, file)
|
||||
|
||||
uploads an image
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
// TODO Configure OAuth2 access token for authorization: petstore_auth
|
||||
//openapi.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
var api_instance = new PetApi();
|
||||
var petId = 789; // int | ID of pet to update
|
||||
var additionalMetadata = additionalMetadata_example; // String | Additional data to pass to server
|
||||
var file = BINARY_DATA_HERE; // MultipartFile | file to upload
|
||||
|
||||
try {
|
||||
var result = api_instance.uploadFile(petId, additionalMetadata, file);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print("Exception when calling PetApi->uploadFile: $e\n");
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **int**| ID of pet to update | [default to null]
|
||||
**additionalMetadata** | **String**| Additional data to pass to server | [optional] [default to null]
|
||||
**file** | **MultipartFile****MultipartFile**| file to upload | [optional] [default to null]
|
||||
|
||||
### Return type
|
||||
|
||||
[**ApiResponse**](ApiResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: multipart/form-data
|
||||
- **Accept**: application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
@ -1,349 +0,0 @@
|
||||
# openapi.api.UserApi
|
||||
|
||||
## Load the API package
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
```
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**createUser**](UserApi.md#createUser) | **Post** /user | Create user
|
||||
[**createUsersWithArrayInput**](UserApi.md#createUsersWithArrayInput) | **Post** /user/createWithArray | Creates list of users with given input array
|
||||
[**createUsersWithListInput**](UserApi.md#createUsersWithListInput) | **Post** /user/createWithList | Creates list of users with given input array
|
||||
[**deleteUser**](UserApi.md#deleteUser) | **Delete** /user/:username | Delete user
|
||||
[**getUserByName**](UserApi.md#getUserByName) | **Get** /user/:username | Get user by user name
|
||||
[**loginUser**](UserApi.md#loginUser) | **Get** /user/login | Logs user into the system
|
||||
[**logoutUser**](UserApi.md#logoutUser) | **Get** /user/logout | Logs out current logged in user session
|
||||
[**updateUser**](UserApi.md#updateUser) | **Put** /user/:username | Updated user
|
||||
|
||||
|
||||
# **createUser**
|
||||
> createUser(body)
|
||||
|
||||
Create user
|
||||
|
||||
This can only be done by the logged in user.
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
|
||||
var api_instance = new UserApi();
|
||||
var body = new User(); // User | Created user object
|
||||
|
||||
try {
|
||||
api_instance.createUser(body);
|
||||
} catch (e) {
|
||||
print("Exception when calling UserApi->createUser: $e\n");
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**User**](User.md)| Created user object |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/octet-stream
|
||||
- **Accept**: Not defined
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **createUsersWithArrayInput**
|
||||
> createUsersWithArrayInput(body)
|
||||
|
||||
Creates list of users with given input array
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
|
||||
var api_instance = new UserApi();
|
||||
var body = [new List<User>()]; // List<User> | List of user object
|
||||
|
||||
try {
|
||||
api_instance.createUsersWithArrayInput(body);
|
||||
} catch (e) {
|
||||
print("Exception when calling UserApi->createUsersWithArrayInput: $e\n");
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**List<User>**](User.md)| List of user object |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/octet-stream
|
||||
- **Accept**: Not defined
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **createUsersWithListInput**
|
||||
> createUsersWithListInput(body)
|
||||
|
||||
Creates list of users with given input array
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
|
||||
var api_instance = new UserApi();
|
||||
var body = [new List<User>()]; // List<User> | List of user object
|
||||
|
||||
try {
|
||||
api_instance.createUsersWithListInput(body);
|
||||
} catch (e) {
|
||||
print("Exception when calling UserApi->createUsersWithListInput: $e\n");
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**List<User>**](User.md)| List of user object |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/octet-stream
|
||||
- **Accept**: Not defined
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **deleteUser**
|
||||
> deleteUser(username)
|
||||
|
||||
Delete user
|
||||
|
||||
This can only be done by the logged in user.
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
|
||||
var api_instance = new UserApi();
|
||||
var username = username_example; // String | The name that needs to be deleted
|
||||
|
||||
try {
|
||||
api_instance.deleteUser(username);
|
||||
} catch (e) {
|
||||
print("Exception when calling UserApi->deleteUser: $e\n");
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **String**| The name that needs to be deleted | [default to null]
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **getUserByName**
|
||||
> User getUserByName(username)
|
||||
|
||||
Get user by user name
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
|
||||
var api_instance = new UserApi();
|
||||
var username = username_example; // String | The name that needs to be fetched. Use user1 for testing.
|
||||
|
||||
try {
|
||||
var result = api_instance.getUserByName(username);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print("Exception when calling UserApi->getUserByName: $e\n");
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **String**| The name that needs to be fetched. Use user1 for testing. | [default to null]
|
||||
|
||||
### Return type
|
||||
|
||||
[**User**](User.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **loginUser**
|
||||
> String loginUser(username, password)
|
||||
|
||||
Logs user into the system
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
|
||||
var api_instance = new UserApi();
|
||||
var username = username_example; // String | The user name for login
|
||||
var password = password_example; // String | The password for login in clear text
|
||||
|
||||
try {
|
||||
var result = api_instance.loginUser(username, password);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print("Exception when calling UserApi->loginUser: $e\n");
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **String**| The user name for login | [default to null]
|
||||
**password** | **String**| The password for login in clear text | [default to null]
|
||||
|
||||
### Return type
|
||||
|
||||
**String**
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **logoutUser**
|
||||
> logoutUser()
|
||||
|
||||
Logs out current logged in user session
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
|
||||
var api_instance = new UserApi();
|
||||
|
||||
try {
|
||||
api_instance.logoutUser();
|
||||
} catch (e) {
|
||||
print("Exception when calling UserApi->logoutUser: $e\n");
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **updateUser**
|
||||
> updateUser(username, body)
|
||||
|
||||
Updated user
|
||||
|
||||
This can only be done by the logged in user.
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
|
||||
var api_instance = new UserApi();
|
||||
var username = username_example; // String | name that need to be deleted
|
||||
var body = new User(); // User | Updated user object
|
||||
|
||||
try {
|
||||
api_instance.updateUser(username, body);
|
||||
} catch (e) {
|
||||
print("Exception when calling UserApi->updateUser: $e\n");
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **String**| name that need to be deleted | [default to null]
|
||||
**body** | [**User**](User.md)| Updated user object |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/octet-stream
|
||||
- **Accept**: Not defined
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
@ -3,7 +3,7 @@ import 'package:test/test.dart';
|
||||
|
||||
// tests for ApiResponse
|
||||
void main() {
|
||||
var instance = new Pet();
|
||||
var instance = new ApiResponse();
|
||||
|
||||
group('test ApiResponse', () {
|
||||
// int code (default value: null)
|
||||
|
@ -3,7 +3,7 @@ import 'package:test/test.dart';
|
||||
|
||||
// tests for Category
|
||||
void main() {
|
||||
var instance = new Pet();
|
||||
var instance = new Category();
|
||||
|
||||
group('test Category', () {
|
||||
// int id (default value: null)
|
||||
|
@ -3,7 +3,7 @@ import 'package:test/test.dart';
|
||||
|
||||
// tests for Order
|
||||
void main() {
|
||||
var instance = new Pet();
|
||||
var instance = new Order();
|
||||
|
||||
group('test Order', () {
|
||||
// int id (default value: null)
|
||||
|
@ -9,14 +9,14 @@ void main() {
|
||||
group('tests for PetApi', () {
|
||||
// Add a new pet to the store
|
||||
//
|
||||
//Future addPet(Pet body) async
|
||||
//Future addPet(Pet body) async
|
||||
test('test addPet', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// Deletes a pet
|
||||
//
|
||||
//Future deletePet(int petId, { String apiKey }) async
|
||||
//Future deletePet(int petId, { String apiKey }) async
|
||||
test('test deletePet', () async {
|
||||
// TODO
|
||||
});
|
||||
@ -25,7 +25,7 @@ void main() {
|
||||
//
|
||||
// Multiple status values can be provided with comma separated strings
|
||||
//
|
||||
//Future<List<Pet>> findPetsByStatus(List<String> status) async
|
||||
//Future<List<Pet>> findPetsByStatus(List<String> status) async
|
||||
test('test findPetsByStatus', () async {
|
||||
// TODO
|
||||
});
|
||||
@ -34,7 +34,7 @@ void main() {
|
||||
//
|
||||
// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
//
|
||||
//Future<List<Pet>> findPetsByTags(List<String> tags) async
|
||||
//Future<List<Pet>> findPetsByTags(List<String> tags) async
|
||||
test('test findPetsByTags', () async {
|
||||
// TODO
|
||||
});
|
||||
@ -43,28 +43,28 @@ void main() {
|
||||
//
|
||||
// Returns a single pet
|
||||
//
|
||||
//Future<Pet> getPetById(int petId) async
|
||||
//Future<Pet> getPetById(int petId) async
|
||||
test('test getPetById', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// Update an existing pet
|
||||
//
|
||||
//Future updatePet(Pet body) async
|
||||
//Future updatePet(Pet body) async
|
||||
test('test updatePet', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// Updates a pet in the store with form data
|
||||
//
|
||||
//Future updatePetWithForm(int petId, { String name, String status }) async
|
||||
//Future updatePetWithForm(int petId, { String name, String status }) async
|
||||
test('test updatePetWithForm', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// uploads an image
|
||||
//
|
||||
//Future<ApiResponse> uploadFile(int petId, { String additionalMetadata, MultipartFile file }) async
|
||||
//Future<ApiResponse> uploadFile(int petId, { String additionalMetadata, MultipartFile file }) async
|
||||
test('test uploadFile', () async {
|
||||
// TODO
|
||||
});
|
||||
|
@ -11,7 +11,7 @@ void main() {
|
||||
//
|
||||
// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
//
|
||||
//Future deleteOrder(String orderId) async
|
||||
//Future deleteOrder(String orderId) async
|
||||
test('test deleteOrder', () async {
|
||||
// TODO
|
||||
});
|
||||
@ -20,7 +20,7 @@ void main() {
|
||||
//
|
||||
// Returns a map of status codes to quantities
|
||||
//
|
||||
//Future<Map<String, int>> getInventory() async
|
||||
//Future<Map<String, int>> getInventory() async
|
||||
test('test getInventory', () async {
|
||||
// TODO
|
||||
});
|
||||
@ -29,14 +29,14 @@ void main() {
|
||||
//
|
||||
// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
//
|
||||
//Future<Order> getOrderById(int orderId) async
|
||||
//Future<Order> getOrderById(int orderId) async
|
||||
test('test getOrderById', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// Place an order for a pet
|
||||
//
|
||||
//Future<Order> placeOrder(Order body) async
|
||||
//Future<Order> placeOrder(Order body) async
|
||||
test('test placeOrder', () async {
|
||||
// TODO
|
||||
});
|
||||
|
@ -3,7 +3,7 @@ import 'package:test/test.dart';
|
||||
|
||||
// tests for Tag
|
||||
void main() {
|
||||
var instance = new Pet();
|
||||
var instance = new Tag();
|
||||
|
||||
group('test Tag', () {
|
||||
// int id (default value: null)
|
||||
|
@ -11,21 +11,21 @@ void main() {
|
||||
//
|
||||
// This can only be done by the logged in user.
|
||||
//
|
||||
//Future createUser(User body) async
|
||||
//Future createUser(User body) async
|
||||
test('test createUser', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// Creates list of users with given input array
|
||||
//
|
||||
//Future createUsersWithArrayInput(List<User> body) async
|
||||
//Future createUsersWithArrayInput(List<User> body) async
|
||||
test('test createUsersWithArrayInput', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// Creates list of users with given input array
|
||||
//
|
||||
//Future createUsersWithListInput(List<User> body) async
|
||||
//Future createUsersWithListInput(List<User> body) async
|
||||
test('test createUsersWithListInput', () async {
|
||||
// TODO
|
||||
});
|
||||
@ -34,28 +34,28 @@ void main() {
|
||||
//
|
||||
// This can only be done by the logged in user.
|
||||
//
|
||||
//Future deleteUser(String username) async
|
||||
//Future deleteUser(String username) async
|
||||
test('test deleteUser', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// Get user by user name
|
||||
//
|
||||
//Future<User> getUserByName(String username) async
|
||||
//Future<User> getUserByName(String username) async
|
||||
test('test getUserByName', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// Logs user into the system
|
||||
//
|
||||
//Future<String> loginUser(String username, String password) async
|
||||
//Future<String> loginUser(String username, String password) async
|
||||
test('test loginUser', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// Logs out current logged in user session
|
||||
//
|
||||
//Future logoutUser() async
|
||||
//Future logoutUser() async
|
||||
test('test logoutUser', () async {
|
||||
// TODO
|
||||
});
|
||||
@ -64,7 +64,7 @@ void main() {
|
||||
//
|
||||
// This can only be done by the logged in user.
|
||||
//
|
||||
//Future updateUser(String username, User body) async
|
||||
//Future updateUser(String username, User body) async
|
||||
test('test updateUser', () async {
|
||||
// TODO
|
||||
});
|
||||
|
@ -3,7 +3,7 @@ import 'package:test/test.dart';
|
||||
|
||||
// tests for User
|
||||
void main() {
|
||||
var instance = new Pet();
|
||||
var instance = new User();
|
||||
|
||||
group('test User', () {
|
||||
// int id (default value: null)
|
||||
|
@ -1,20 +0,0 @@
|
||||
# openapi.model.Order
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **int** | | [optional] [default to null]
|
||||
**petId** | **int** | | [optional] [default to null]
|
||||
**quantity** | **int** | | [optional] [default to null]
|
||||
**shipDate** | [**DateTime**](DateTime.md) | | [optional] [default to null]
|
||||
**status** | **String** | Order Status | [optional] [default to null]
|
||||
**complete** | **bool** | | [optional] [default to false]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -1,20 +0,0 @@
|
||||
# openapi.model.Pet
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **int** | | [optional] [default to null]
|
||||
**category** | [**Category**](Category.md) | | [optional] [default to null]
|
||||
**name** | **String** | | [default to null]
|
||||
**photoUrls** | **List<String>** | | [default to const []]
|
||||
**tags** | [**List<Tag>**](Tag.md) | | [optional] [default to const []]
|
||||
**status** | **String** | pet status in the store | [optional] [default to null]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -1,379 +0,0 @@
|
||||
# openapi.api.PetApi
|
||||
|
||||
## Load the API package
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
```
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**addPet**](PetApi.md#addPet) | **Post** /pet | Add a new pet to the store
|
||||
[**deletePet**](PetApi.md#deletePet) | **Delete** /pet/:petId | Deletes a pet
|
||||
[**findPetsByStatus**](PetApi.md#findPetsByStatus) | **Get** /pet/findByStatus | Finds Pets by status
|
||||
[**findPetsByTags**](PetApi.md#findPetsByTags) | **Get** /pet/findByTags | Finds Pets by tags
|
||||
[**getPetById**](PetApi.md#getPetById) | **Get** /pet/:petId | Find pet by ID
|
||||
[**updatePet**](PetApi.md#updatePet) | **Put** /pet | Update an existing pet
|
||||
[**updatePetWithForm**](PetApi.md#updatePetWithForm) | **Post** /pet/:petId | Updates a pet in the store with form data
|
||||
[**uploadFile**](PetApi.md#uploadFile) | **Post** /pet/:petId/uploadImage | uploads an image
|
||||
|
||||
|
||||
# **addPet**
|
||||
> addPet(body)
|
||||
|
||||
Add a new pet to the store
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
// TODO Configure OAuth2 access token for authorization: petstore_auth
|
||||
//openapi.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 store
|
||||
|
||||
try {
|
||||
api_instance.addPet(body);
|
||||
} catch (e) {
|
||||
print("Exception when calling PetApi->addPet: $e\n");
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json, application/xml
|
||||
- **Accept**: Not defined
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **deletePet**
|
||||
> deletePet(petId, apiKey)
|
||||
|
||||
Deletes a pet
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
// TODO Configure OAuth2 access token for authorization: petstore_auth
|
||||
//openapi.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
var api_instance = new PetApi();
|
||||
var petId = 789; // int | Pet id to delete
|
||||
var apiKey = apiKey_example; // String |
|
||||
|
||||
try {
|
||||
api_instance.deletePet(petId, apiKey);
|
||||
} catch (e) {
|
||||
print("Exception when calling PetApi->deletePet: $e\n");
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **int**| Pet id to delete | [default to null]
|
||||
**apiKey** | **String**| | [optional] [default to null]
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **findPetsByStatus**
|
||||
> List<Pet> findPetsByStatus(status)
|
||||
|
||||
Finds Pets by status
|
||||
|
||||
Multiple status values can be provided with comma separated strings
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
// TODO Configure OAuth2 access token for authorization: petstore_auth
|
||||
//openapi.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
var api_instance = new PetApi();
|
||||
var status = []; // List<String> | Status values that need to be considered for filter
|
||||
|
||||
try {
|
||||
var result = api_instance.findPetsByStatus(status);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print("Exception when calling PetApi->findPetsByStatus: $e\n");
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [default to const []]
|
||||
|
||||
### Return type
|
||||
|
||||
[**List<Pet>**](Pet.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **findPetsByTags**
|
||||
> List<Pet> findPetsByTags(tags)
|
||||
|
||||
Finds Pets by tags
|
||||
|
||||
Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
// TODO Configure OAuth2 access token for authorization: petstore_auth
|
||||
//openapi.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
var api_instance = new PetApi();
|
||||
var tags = []; // List<String> | Tags to filter by
|
||||
|
||||
try {
|
||||
var result = api_instance.findPetsByTags(tags);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print("Exception when calling PetApi->findPetsByTags: $e\n");
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**tags** | [**List<String>**](String.md)| Tags to filter by | [default to const []]
|
||||
|
||||
### Return type
|
||||
|
||||
[**List<Pet>**](Pet.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **getPetById**
|
||||
> Pet getPetById(petId)
|
||||
|
||||
Find pet by ID
|
||||
|
||||
Returns a single pet
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
// TODO Configure API key authorization: api_key
|
||||
//openapi.api.Configuration.apiKey{'api_key'} = 'YOUR_API_KEY';
|
||||
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
//openapi.api.Configuration.apiKeyPrefix{'api_key'} = "Bearer";
|
||||
|
||||
var api_instance = new PetApi();
|
||||
var petId = 789; // int | ID of pet to return
|
||||
|
||||
try {
|
||||
var result = api_instance.getPetById(petId);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print("Exception when calling PetApi->getPetById: $e\n");
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **int**| ID of pet to return | [default to null]
|
||||
|
||||
### Return type
|
||||
|
||||
[**Pet**](Pet.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[api_key](../README.md#api_key)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **updatePet**
|
||||
> updatePet(body)
|
||||
|
||||
Update an existing pet
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
// TODO Configure OAuth2 access token for authorization: petstore_auth
|
||||
//openapi.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 store
|
||||
|
||||
try {
|
||||
api_instance.updatePet(body);
|
||||
} catch (e) {
|
||||
print("Exception when calling PetApi->updatePet: $e\n");
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json, application/xml
|
||||
- **Accept**: Not defined
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **updatePetWithForm**
|
||||
> updatePetWithForm(petId, name, status)
|
||||
|
||||
Updates a pet in the store with form data
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
// TODO Configure OAuth2 access token for authorization: petstore_auth
|
||||
//openapi.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
var api_instance = new PetApi();
|
||||
var petId = 789; // int | ID of pet that needs to be updated
|
||||
var name = name_example; // String | Updated name of the pet
|
||||
var status = status_example; // String | Updated status of the pet
|
||||
|
||||
try {
|
||||
api_instance.updatePetWithForm(petId, name, status);
|
||||
} catch (e) {
|
||||
print("Exception when calling PetApi->updatePetWithForm: $e\n");
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **int**| ID of pet that needs to be updated | [default to null]
|
||||
**name** | **String**| Updated name of the pet | [optional] [default to null]
|
||||
**status** | **String**| Updated status of the pet | [optional] [default to null]
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/x-www-form-urlencoded
|
||||
- **Accept**: Not defined
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **uploadFile**
|
||||
> ApiResponse uploadFile(petId, additionalMetadata, file)
|
||||
|
||||
uploads an image
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
// TODO Configure OAuth2 access token for authorization: petstore_auth
|
||||
//openapi.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
var api_instance = new PetApi();
|
||||
var petId = 789; // int | ID of pet to update
|
||||
var additionalMetadata = additionalMetadata_example; // String | Additional data to pass to server
|
||||
var file = BINARY_DATA_HERE; // MultipartFile | file to upload
|
||||
|
||||
try {
|
||||
var result = api_instance.uploadFile(petId, additionalMetadata, file);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print("Exception when calling PetApi->uploadFile: $e\n");
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **int**| ID of pet to update | [default to null]
|
||||
**additionalMetadata** | **String**| Additional data to pass to server | [optional] [default to null]
|
||||
**file** | **MultipartFile****MultipartFile**| file to upload | [optional] [default to null]
|
||||
|
||||
### Return type
|
||||
|
||||
[**ApiResponse**](ApiResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: multipart/form-data
|
||||
- **Accept**: application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
@ -1,186 +0,0 @@
|
||||
# openapi.api.StoreApi
|
||||
|
||||
## Load the API package
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
```
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**deleteOrder**](StoreApi.md#deleteOrder) | **Delete** /store/order/:orderId | Delete purchase order by ID
|
||||
[**getInventory**](StoreApi.md#getInventory) | **Get** /store/inventory | Returns pet inventories by status
|
||||
[**getOrderById**](StoreApi.md#getOrderById) | **Get** /store/order/:orderId | Find purchase order by ID
|
||||
[**placeOrder**](StoreApi.md#placeOrder) | **Post** /store/order | Place an order for a pet
|
||||
|
||||
|
||||
# **deleteOrder**
|
||||
> deleteOrder(orderId)
|
||||
|
||||
Delete purchase order by ID
|
||||
|
||||
For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
|
||||
var api_instance = new StoreApi();
|
||||
var orderId = orderId_example; // String | ID of the order that needs to be deleted
|
||||
|
||||
try {
|
||||
api_instance.deleteOrder(orderId);
|
||||
} catch (e) {
|
||||
print("Exception when calling StoreApi->deleteOrder: $e\n");
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**orderId** | **String**| ID of the order that needs to be deleted | [default to null]
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **getInventory**
|
||||
> Map<String, int> getInventory()
|
||||
|
||||
Returns pet inventories by status
|
||||
|
||||
Returns a map of status codes to quantities
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
// TODO Configure API key authorization: api_key
|
||||
//openapi.api.Configuration.apiKey{'api_key'} = 'YOUR_API_KEY';
|
||||
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
//openapi.api.Configuration.apiKeyPrefix{'api_key'} = "Bearer";
|
||||
|
||||
var api_instance = new StoreApi();
|
||||
|
||||
try {
|
||||
var result = api_instance.getInventory();
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print("Exception when calling StoreApi->getInventory: $e\n");
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
**Map<String, int>**
|
||||
|
||||
### Authorization
|
||||
|
||||
[api_key](../README.md#api_key)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **getOrderById**
|
||||
> Order getOrderById(orderId)
|
||||
|
||||
Find purchase order by ID
|
||||
|
||||
For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
|
||||
var api_instance = new StoreApi();
|
||||
var orderId = 789; // int | ID of pet that needs to be fetched
|
||||
|
||||
try {
|
||||
var result = api_instance.getOrderById(orderId);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print("Exception when calling StoreApi->getOrderById: $e\n");
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**orderId** | **int**| ID of pet that needs to be fetched | [default to null]
|
||||
|
||||
### Return type
|
||||
|
||||
[**Order**](Order.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **placeOrder**
|
||||
> Order placeOrder(body)
|
||||
|
||||
Place an order for a pet
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
|
||||
var api_instance = new StoreApi();
|
||||
var body = new Order(); // Order | order placed for purchasing the pet
|
||||
|
||||
try {
|
||||
var result = api_instance.placeOrder(body);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print("Exception when calling StoreApi->placeOrder: $e\n");
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**Order**](Order.md)| order placed for purchasing the pet |
|
||||
|
||||
### Return type
|
||||
|
||||
[**Order**](Order.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
@ -1,22 +0,0 @@
|
||||
# openapi.model.User
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **int** | | [optional] [default to null]
|
||||
**username** | **String** | | [optional] [default to null]
|
||||
**firstName** | **String** | | [optional] [default to null]
|
||||
**lastName** | **String** | | [optional] [default to null]
|
||||
**email** | **String** | | [optional] [default to null]
|
||||
**password** | **String** | | [optional] [default to null]
|
||||
**phone** | **String** | | [optional] [default to null]
|
||||
**userStatus** | **int** | User Status | [optional] [default to null]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -9,14 +9,14 @@ void main() {
|
||||
group('tests for PetApi', () {
|
||||
// Add a new pet to the store
|
||||
//
|
||||
//Future addPet(Pet body) async
|
||||
//Future addPet(Pet body) async
|
||||
test('test addPet', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// Deletes a pet
|
||||
//
|
||||
//Future deletePet(int petId, { String apiKey }) async
|
||||
//Future deletePet(int petId, { String apiKey }) async
|
||||
test('test deletePet', () async {
|
||||
// TODO
|
||||
});
|
||||
@ -25,7 +25,7 @@ void main() {
|
||||
//
|
||||
// Multiple status values can be provided with comma separated strings
|
||||
//
|
||||
//Future<List<Pet>> findPetsByStatus(List<String> status) async
|
||||
//Future<List<Pet>> findPetsByStatus(List<String> status) async
|
||||
test('test findPetsByStatus', () async {
|
||||
// TODO
|
||||
});
|
||||
@ -34,7 +34,7 @@ void main() {
|
||||
//
|
||||
// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
//
|
||||
//Future<List<Pet>> findPetsByTags(List<String> tags) async
|
||||
//Future<List<Pet>> findPetsByTags(List<String> tags) async
|
||||
test('test findPetsByTags', () async {
|
||||
// TODO
|
||||
});
|
||||
@ -43,28 +43,28 @@ void main() {
|
||||
//
|
||||
// Returns a single pet
|
||||
//
|
||||
//Future<Pet> getPetById(int petId) async
|
||||
//Future<Pet> getPetById(int petId) async
|
||||
test('test getPetById', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// Update an existing pet
|
||||
//
|
||||
//Future updatePet(Pet body) async
|
||||
//Future updatePet(Pet body) async
|
||||
test('test updatePet', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// Updates a pet in the store with form data
|
||||
//
|
||||
//Future updatePetWithForm(int petId, { String name, String status }) async
|
||||
//Future updatePetWithForm(int petId, { String name, String status }) async
|
||||
test('test updatePetWithForm', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// uploads an image
|
||||
//
|
||||
//Future<ApiResponse> uploadFile(int petId, { String additionalMetadata, MultipartFile file }) async
|
||||
//Future<ApiResponse> uploadFile(int petId, { String additionalMetadata, MultipartFile file }) async
|
||||
test('test uploadFile', () async {
|
||||
// TODO
|
||||
});
|
||||
|
@ -11,7 +11,7 @@ void main() {
|
||||
//
|
||||
// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
//
|
||||
//Future deleteOrder(String orderId) async
|
||||
//Future deleteOrder(String orderId) async
|
||||
test('test deleteOrder', () async {
|
||||
// TODO
|
||||
});
|
||||
@ -20,7 +20,7 @@ void main() {
|
||||
//
|
||||
// Returns a map of status codes to quantities
|
||||
//
|
||||
//Future<Map<String, int>> getInventory() async
|
||||
//Future<Map<String, int>> getInventory() async
|
||||
test('test getInventory', () async {
|
||||
// TODO
|
||||
});
|
||||
@ -29,14 +29,14 @@ void main() {
|
||||
//
|
||||
// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
//
|
||||
//Future<Order> getOrderById(int orderId) async
|
||||
//Future<Order> getOrderById(int orderId) async
|
||||
test('test getOrderById', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// Place an order for a pet
|
||||
//
|
||||
//Future<Order> placeOrder(Order body) async
|
||||
//Future<Order> placeOrder(Order body) async
|
||||
test('test placeOrder', () async {
|
||||
// TODO
|
||||
});
|
||||
|
@ -11,21 +11,21 @@ void main() {
|
||||
//
|
||||
// This can only be done by the logged in user.
|
||||
//
|
||||
//Future createUser(User body) async
|
||||
//Future createUser(User body) async
|
||||
test('test createUser', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// Creates list of users with given input array
|
||||
//
|
||||
//Future createUsersWithArrayInput(List<User> body) async
|
||||
//Future createUsersWithArrayInput(List<User> body) async
|
||||
test('test createUsersWithArrayInput', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// Creates list of users with given input array
|
||||
//
|
||||
//Future createUsersWithListInput(List<User> body) async
|
||||
//Future createUsersWithListInput(List<User> body) async
|
||||
test('test createUsersWithListInput', () async {
|
||||
// TODO
|
||||
});
|
||||
@ -34,28 +34,28 @@ void main() {
|
||||
//
|
||||
// This can only be done by the logged in user.
|
||||
//
|
||||
//Future deleteUser(String username) async
|
||||
//Future deleteUser(String username) async
|
||||
test('test deleteUser', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// Get user by user name
|
||||
//
|
||||
//Future<User> getUserByName(String username) async
|
||||
//Future<User> getUserByName(String username) async
|
||||
test('test getUserByName', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// Logs user into the system
|
||||
//
|
||||
//Future<String> loginUser(String username, String password) async
|
||||
//Future<String> loginUser(String username, String password) async
|
||||
test('test loginUser', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// Logs out current logged in user session
|
||||
//
|
||||
//Future logoutUser() async
|
||||
//Future logoutUser() async
|
||||
test('test logoutUser', () async {
|
||||
// TODO
|
||||
});
|
||||
@ -64,7 +64,7 @@ void main() {
|
||||
//
|
||||
// This can only be done by the logged in user.
|
||||
//
|
||||
//Future updateUser(String username, User body) async
|
||||
//Future updateUser(String username, User body) async
|
||||
test('test updateUser', () async {
|
||||
// TODO
|
||||
});
|
||||
|
@ -1,17 +0,0 @@
|
||||
# openapi.model.ApiResponse
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**code** | **int** | | [optional] [default to null]
|
||||
**type** | **String** | | [optional] [default to null]
|
||||
**message** | **String** | | [optional] [default to null]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -1,186 +0,0 @@
|
||||
# openapi.api.StoreApi
|
||||
|
||||
## Load the API package
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
```
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**deleteOrder**](StoreApi.md#deleteOrder) | **Delete** /store/order/:orderId | Delete purchase order by ID
|
||||
[**getInventory**](StoreApi.md#getInventory) | **Get** /store/inventory | Returns pet inventories by status
|
||||
[**getOrderById**](StoreApi.md#getOrderById) | **Get** /store/order/:orderId | Find purchase order by ID
|
||||
[**placeOrder**](StoreApi.md#placeOrder) | **Post** /store/order | Place an order for a pet
|
||||
|
||||
|
||||
# **deleteOrder**
|
||||
> deleteOrder(orderId)
|
||||
|
||||
Delete purchase order by ID
|
||||
|
||||
For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
|
||||
var api_instance = new StoreApi();
|
||||
var orderId = orderId_example; // String | ID of the order that needs to be deleted
|
||||
|
||||
try {
|
||||
api_instance.deleteOrder(orderId);
|
||||
} catch (e) {
|
||||
print("Exception when calling StoreApi->deleteOrder: $e\n");
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**orderId** | **String**| ID of the order that needs to be deleted | [default to null]
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **getInventory**
|
||||
> Map<String, int> getInventory()
|
||||
|
||||
Returns pet inventories by status
|
||||
|
||||
Returns a map of status codes to quantities
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
// TODO Configure API key authorization: api_key
|
||||
//openapi.api.Configuration.apiKey{'api_key'} = 'YOUR_API_KEY';
|
||||
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
//openapi.api.Configuration.apiKeyPrefix{'api_key'} = "Bearer";
|
||||
|
||||
var api_instance = new StoreApi();
|
||||
|
||||
try {
|
||||
var result = api_instance.getInventory();
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print("Exception when calling StoreApi->getInventory: $e\n");
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
**Map<String, int>**
|
||||
|
||||
### Authorization
|
||||
|
||||
[api_key](../README.md#api_key)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **getOrderById**
|
||||
> Order getOrderById(orderId)
|
||||
|
||||
Find purchase order by ID
|
||||
|
||||
For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
|
||||
var api_instance = new StoreApi();
|
||||
var orderId = 789; // int | ID of pet that needs to be fetched
|
||||
|
||||
try {
|
||||
var result = api_instance.getOrderById(orderId);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print("Exception when calling StoreApi->getOrderById: $e\n");
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**orderId** | **int**| ID of pet that needs to be fetched | [default to null]
|
||||
|
||||
### Return type
|
||||
|
||||
[**Order**](Order.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **placeOrder**
|
||||
> Order placeOrder(body)
|
||||
|
||||
Place an order for a pet
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
|
||||
var api_instance = new StoreApi();
|
||||
var body = new Order(); // Order | order placed for purchasing the pet
|
||||
|
||||
try {
|
||||
var result = api_instance.placeOrder(body);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print("Exception when calling StoreApi->placeOrder: $e\n");
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**Order**](Order.md)| order placed for purchasing the pet |
|
||||
|
||||
### Return type
|
||||
|
||||
[**Order**](Order.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/octet-stream
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
@ -1,22 +0,0 @@
|
||||
# openapi.model.User
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **int** | | [optional] [default to null]
|
||||
**username** | **String** | | [optional] [default to null]
|
||||
**firstName** | **String** | | [optional] [default to null]
|
||||
**lastName** | **String** | | [optional] [default to null]
|
||||
**email** | **String** | | [optional] [default to null]
|
||||
**password** | **String** | | [optional] [default to null]
|
||||
**phone** | **String** | | [optional] [default to null]
|
||||
**userStatus** | **int** | User Status | [optional] [default to null]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -1,349 +0,0 @@
|
||||
# openapi.api.UserApi
|
||||
|
||||
## Load the API package
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
```
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**createUser**](UserApi.md#createUser) | **Post** /user | Create user
|
||||
[**createUsersWithArrayInput**](UserApi.md#createUsersWithArrayInput) | **Post** /user/createWithArray | Creates list of users with given input array
|
||||
[**createUsersWithListInput**](UserApi.md#createUsersWithListInput) | **Post** /user/createWithList | Creates list of users with given input array
|
||||
[**deleteUser**](UserApi.md#deleteUser) | **Delete** /user/:username | Delete user
|
||||
[**getUserByName**](UserApi.md#getUserByName) | **Get** /user/:username | Get user by user name
|
||||
[**loginUser**](UserApi.md#loginUser) | **Get** /user/login | Logs user into the system
|
||||
[**logoutUser**](UserApi.md#logoutUser) | **Get** /user/logout | Logs out current logged in user session
|
||||
[**updateUser**](UserApi.md#updateUser) | **Put** /user/:username | Updated user
|
||||
|
||||
|
||||
# **createUser**
|
||||
> createUser(body)
|
||||
|
||||
Create user
|
||||
|
||||
This can only be done by the logged in user.
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
|
||||
var api_instance = new UserApi();
|
||||
var body = new User(); // User | Created user object
|
||||
|
||||
try {
|
||||
api_instance.createUser(body);
|
||||
} catch (e) {
|
||||
print("Exception when calling UserApi->createUser: $e\n");
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**User**](User.md)| Created user object |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/octet-stream
|
||||
- **Accept**: Not defined
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **createUsersWithArrayInput**
|
||||
> createUsersWithArrayInput(body)
|
||||
|
||||
Creates list of users with given input array
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
|
||||
var api_instance = new UserApi();
|
||||
var body = [new List<User>()]; // List<User> | List of user object
|
||||
|
||||
try {
|
||||
api_instance.createUsersWithArrayInput(body);
|
||||
} catch (e) {
|
||||
print("Exception when calling UserApi->createUsersWithArrayInput: $e\n");
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**List<User>**](User.md)| List of user object |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/octet-stream
|
||||
- **Accept**: Not defined
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **createUsersWithListInput**
|
||||
> createUsersWithListInput(body)
|
||||
|
||||
Creates list of users with given input array
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
|
||||
var api_instance = new UserApi();
|
||||
var body = [new List<User>()]; // List<User> | List of user object
|
||||
|
||||
try {
|
||||
api_instance.createUsersWithListInput(body);
|
||||
} catch (e) {
|
||||
print("Exception when calling UserApi->createUsersWithListInput: $e\n");
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**List<User>**](User.md)| List of user object |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/octet-stream
|
||||
- **Accept**: Not defined
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **deleteUser**
|
||||
> deleteUser(username)
|
||||
|
||||
Delete user
|
||||
|
||||
This can only be done by the logged in user.
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
|
||||
var api_instance = new UserApi();
|
||||
var username = username_example; // String | The name that needs to be deleted
|
||||
|
||||
try {
|
||||
api_instance.deleteUser(username);
|
||||
} catch (e) {
|
||||
print("Exception when calling UserApi->deleteUser: $e\n");
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **String**| The name that needs to be deleted | [default to null]
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **getUserByName**
|
||||
> User getUserByName(username)
|
||||
|
||||
Get user by user name
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
|
||||
var api_instance = new UserApi();
|
||||
var username = username_example; // String | The name that needs to be fetched. Use user1 for testing.
|
||||
|
||||
try {
|
||||
var result = api_instance.getUserByName(username);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print("Exception when calling UserApi->getUserByName: $e\n");
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **String**| The name that needs to be fetched. Use user1 for testing. | [default to null]
|
||||
|
||||
### Return type
|
||||
|
||||
[**User**](User.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **loginUser**
|
||||
> String loginUser(username, password)
|
||||
|
||||
Logs user into the system
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
|
||||
var api_instance = new UserApi();
|
||||
var username = username_example; // String | The user name for login
|
||||
var password = password_example; // String | The password for login in clear text
|
||||
|
||||
try {
|
||||
var result = api_instance.loginUser(username, password);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print("Exception when calling UserApi->loginUser: $e\n");
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **String**| The user name for login | [default to null]
|
||||
**password** | **String**| The password for login in clear text | [default to null]
|
||||
|
||||
### Return type
|
||||
|
||||
**String**
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **logoutUser**
|
||||
> logoutUser()
|
||||
|
||||
Logs out current logged in user session
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
|
||||
var api_instance = new UserApi();
|
||||
|
||||
try {
|
||||
api_instance.logoutUser();
|
||||
} catch (e) {
|
||||
print("Exception when calling UserApi->logoutUser: $e\n");
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **updateUser**
|
||||
> updateUser(username, body)
|
||||
|
||||
Updated user
|
||||
|
||||
This can only be done by the logged in user.
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
|
||||
var api_instance = new UserApi();
|
||||
var username = username_example; // String | name that need to be deleted
|
||||
var body = new User(); // User | Updated user object
|
||||
|
||||
try {
|
||||
api_instance.updateUser(username, body);
|
||||
} catch (e) {
|
||||
print("Exception when calling UserApi->updateUser: $e\n");
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **String**| name that need to be deleted | [default to null]
|
||||
**body** | [**User**](User.md)| Updated user object |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/octet-stream
|
||||
- **Accept**: Not defined
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
@ -3,7 +3,7 @@ import 'package:test/test.dart';
|
||||
|
||||
// tests for ApiResponse
|
||||
void main() {
|
||||
var instance = new Pet();
|
||||
var instance = new ApiResponse();
|
||||
|
||||
group('test ApiResponse', () {
|
||||
// int code (default value: null)
|
||||
|
@ -3,7 +3,7 @@ import 'package:test/test.dart';
|
||||
|
||||
// tests for Category
|
||||
void main() {
|
||||
var instance = new Pet();
|
||||
var instance = new Category();
|
||||
|
||||
group('test Category', () {
|
||||
// int id (default value: null)
|
||||
|
@ -3,7 +3,7 @@ import 'package:test/test.dart';
|
||||
|
||||
// tests for Order
|
||||
void main() {
|
||||
var instance = new Pet();
|
||||
var instance = new Order();
|
||||
|
||||
group('test Order', () {
|
||||
// int id (default value: null)
|
||||
|
@ -9,14 +9,14 @@ void main() {
|
||||
group('tests for PetApi', () {
|
||||
// Add a new pet to the store
|
||||
//
|
||||
//Future addPet(Pet body) async
|
||||
//Future addPet(Pet body) async
|
||||
test('test addPet', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// Deletes a pet
|
||||
//
|
||||
//Future deletePet(int petId, { String apiKey }) async
|
||||
//Future deletePet(int petId, { String apiKey }) async
|
||||
test('test deletePet', () async {
|
||||
// TODO
|
||||
});
|
||||
@ -25,7 +25,7 @@ void main() {
|
||||
//
|
||||
// Multiple status values can be provided with comma separated strings
|
||||
//
|
||||
//Future<List<Pet>> findPetsByStatus(List<String> status) async
|
||||
//Future<List<Pet>> findPetsByStatus(List<String> status) async
|
||||
test('test findPetsByStatus', () async {
|
||||
// TODO
|
||||
});
|
||||
@ -34,7 +34,7 @@ void main() {
|
||||
//
|
||||
// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
//
|
||||
//Future<List<Pet>> findPetsByTags(List<String> tags) async
|
||||
//Future<List<Pet>> findPetsByTags(List<String> tags) async
|
||||
test('test findPetsByTags', () async {
|
||||
// TODO
|
||||
});
|
||||
@ -43,28 +43,28 @@ void main() {
|
||||
//
|
||||
// Returns a single pet
|
||||
//
|
||||
//Future<Pet> getPetById(int petId) async
|
||||
//Future<Pet> getPetById(int petId) async
|
||||
test('test getPetById', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// Update an existing pet
|
||||
//
|
||||
//Future updatePet(Pet body) async
|
||||
//Future updatePet(Pet body) async
|
||||
test('test updatePet', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// Updates a pet in the store with form data
|
||||
//
|
||||
//Future updatePetWithForm(int petId, { String name, String status }) async
|
||||
//Future updatePetWithForm(int petId, { String name, String status }) async
|
||||
test('test updatePetWithForm', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// uploads an image
|
||||
//
|
||||
//Future<ApiResponse> uploadFile(int petId, { String additionalMetadata, MultipartFile file }) async
|
||||
//Future<ApiResponse> uploadFile(int petId, { String additionalMetadata, MultipartFile file }) async
|
||||
test('test uploadFile', () async {
|
||||
// TODO
|
||||
});
|
||||
|
@ -11,7 +11,7 @@ void main() {
|
||||
//
|
||||
// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
//
|
||||
//Future deleteOrder(String orderId) async
|
||||
//Future deleteOrder(String orderId) async
|
||||
test('test deleteOrder', () async {
|
||||
// TODO
|
||||
});
|
||||
@ -20,7 +20,7 @@ void main() {
|
||||
//
|
||||
// Returns a map of status codes to quantities
|
||||
//
|
||||
//Future<Map<String, int>> getInventory() async
|
||||
//Future<Map<String, int>> getInventory() async
|
||||
test('test getInventory', () async {
|
||||
// TODO
|
||||
});
|
||||
@ -29,14 +29,14 @@ void main() {
|
||||
//
|
||||
// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
//
|
||||
//Future<Order> getOrderById(int orderId) async
|
||||
//Future<Order> getOrderById(int orderId) async
|
||||
test('test getOrderById', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// Place an order for a pet
|
||||
//
|
||||
//Future<Order> placeOrder(Order body) async
|
||||
//Future<Order> placeOrder(Order body) async
|
||||
test('test placeOrder', () async {
|
||||
// TODO
|
||||
});
|
||||
|
@ -3,7 +3,7 @@ import 'package:test/test.dart';
|
||||
|
||||
// tests for Tag
|
||||
void main() {
|
||||
var instance = new Pet();
|
||||
var instance = new Tag();
|
||||
|
||||
group('test Tag', () {
|
||||
// int id (default value: null)
|
||||
|
@ -11,21 +11,21 @@ void main() {
|
||||
//
|
||||
// This can only be done by the logged in user.
|
||||
//
|
||||
//Future createUser(User body) async
|
||||
//Future createUser(User body) async
|
||||
test('test createUser', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// Creates list of users with given input array
|
||||
//
|
||||
//Future createUsersWithArrayInput(List<User> body) async
|
||||
//Future createUsersWithArrayInput(List<User> body) async
|
||||
test('test createUsersWithArrayInput', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// Creates list of users with given input array
|
||||
//
|
||||
//Future createUsersWithListInput(List<User> body) async
|
||||
//Future createUsersWithListInput(List<User> body) async
|
||||
test('test createUsersWithListInput', () async {
|
||||
// TODO
|
||||
});
|
||||
@ -34,28 +34,28 @@ void main() {
|
||||
//
|
||||
// This can only be done by the logged in user.
|
||||
//
|
||||
//Future deleteUser(String username) async
|
||||
//Future deleteUser(String username) async
|
||||
test('test deleteUser', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// Get user by user name
|
||||
//
|
||||
//Future<User> getUserByName(String username) async
|
||||
//Future<User> getUserByName(String username) async
|
||||
test('test getUserByName', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// Logs user into the system
|
||||
//
|
||||
//Future<String> loginUser(String username, String password) async
|
||||
//Future<String> loginUser(String username, String password) async
|
||||
test('test loginUser', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// Logs out current logged in user session
|
||||
//
|
||||
//Future logoutUser() async
|
||||
//Future logoutUser() async
|
||||
test('test logoutUser', () async {
|
||||
// TODO
|
||||
});
|
||||
@ -64,7 +64,7 @@ void main() {
|
||||
//
|
||||
// This can only be done by the logged in user.
|
||||
//
|
||||
//Future updateUser(String username, User body) async
|
||||
//Future updateUser(String username, User body) async
|
||||
test('test updateUser', () async {
|
||||
// TODO
|
||||
});
|
||||
|
@ -3,7 +3,7 @@ import 'package:test/test.dart';
|
||||
|
||||
// tests for User
|
||||
void main() {
|
||||
var instance = new Pet();
|
||||
var instance = new User();
|
||||
|
||||
group('test User', () {
|
||||
// int id (default value: null)
|
||||
|
@ -1,17 +0,0 @@
|
||||
# openapi.model.ApiResponse
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**code** | **int** | | [optional] [default to null]
|
||||
**type** | **String** | | [optional] [default to null]
|
||||
**message** | **String** | | [optional] [default to null]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -1,16 +0,0 @@
|
||||
# openapi.model.Category
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **int** | | [optional] [default to null]
|
||||
**name** | **String** | | [optional] [default to null]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -1,20 +0,0 @@
|
||||
# openapi.model.Pet
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **int** | | [optional] [default to null]
|
||||
**category** | [**Category**](Category.md) | | [optional] [default to null]
|
||||
**name** | **String** | | [default to null]
|
||||
**photoUrls** | **List<String>** | | [default to []]
|
||||
**tags** | [**List<Tag>**](Tag.md) | | [optional] [default to []]
|
||||
**status** | **String** | pet status in the store | [optional] [default to null]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -1,22 +0,0 @@
|
||||
# openapi.model.User
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **int** | | [optional] [default to null]
|
||||
**username** | **String** | | [optional] [default to null]
|
||||
**firstName** | **String** | | [optional] [default to null]
|
||||
**lastName** | **String** | | [optional] [default to null]
|
||||
**email** | **String** | | [optional] [default to null]
|
||||
**password** | **String** | | [optional] [default to null]
|
||||
**phone** | **String** | | [optional] [default to null]
|
||||
**userStatus** | **int** | User Status | [optional] [default to null]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -1,17 +0,0 @@
|
||||
# openapi.model.ApiResponse
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**code** | **int** | | [optional] [default to null]
|
||||
**type** | **String** | | [optional] [default to null]
|
||||
**message** | **String** | | [optional] [default to null]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -1,16 +0,0 @@
|
||||
# openapi.model.Category
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **int** | | [optional] [default to null]
|
||||
**name** | **String** | | [optional] [default to null]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user