forked from loafle/openapi-generator-original
[dart][dart-dio] Formatting improvements (#8180)
* always add trailing commas in arrays and break each line * make variables final * improve API formatting (mainly leading spaces) * remove empty lines and whitespaces * fix formatting of datatype and description and docs * consistently use single quotation marks (dart already does this)
This commit is contained in:
parent
d1eda02be6
commit
f484e0db42
@ -1,5 +1,4 @@
|
||||
import 'dart:async';
|
||||
import 'dart:io';
|
||||
import 'dart:convert';
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
@ -17,29 +16,37 @@ class {{classname}} {
|
||||
{{classname}}(this._dio, this._serializers);
|
||||
|
||||
{{#operation}}
|
||||
/// {{summary}}
|
||||
///
|
||||
/// {{notes}}
|
||||
Future<Response{{#returnType}}<{{{returnType}}}>{{/returnType}}>{{nickname}}({{#allParams}}{{#required}}{{{dataType}}} {{paramName}},{{/required}}{{/allParams}}{ {{#allParams}}{{^required}}{{{dataType}}} {{paramName}},{{/required}}{{/allParams}}CancelToken cancelToken, Map<String, String> headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async {
|
||||
/// {{{summary}}}
|
||||
///
|
||||
/// {{{notes}}}
|
||||
Future<Response{{#returnType}}<{{{returnType}}}>{{/returnType}}>{{nickname}}({{^hasRequiredParams}}{ {{/hasRequiredParams}}{{#requiredParams}}
|
||||
{{{dataType}}} {{paramName}},{{#-last}} { {{/-last}}{{/requiredParams}}{{#optionalParams}}
|
||||
{{{dataType}}} {{paramName}},{{/optionalParams}}
|
||||
CancelToken cancelToken,
|
||||
Map<String, String> headers,
|
||||
ProgressCallback onSendProgress,
|
||||
ProgressCallback onReceiveProgress,
|
||||
}) async {
|
||||
final String _path = '{{{path}}}'{{#pathParams}}.replaceAll('{' r'{{baseName}}' '}', {{{paramName}}}.toString()){{/pathParams}};
|
||||
|
||||
String _path = "{{{path}}}"{{#pathParams}}.replaceAll("{" r'{{baseName}}' "}", {{{paramName}}}.toString()){{/pathParams}};
|
||||
|
||||
Map<String, dynamic> queryParams = {};
|
||||
Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
final Map<String, dynamic> queryParams = {};
|
||||
final Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
dynamic bodyData;
|
||||
|
||||
{{#headerParams}}
|
||||
headerParams[r'{{baseName}}'] = {{paramName}};
|
||||
headerParams[r'{{baseName}}'] = {{paramName}};
|
||||
{{/headerParams}}
|
||||
{{#queryParams}}
|
||||
queryParams[r'{{baseName}}'] = {{paramName}};
|
||||
queryParams[r'{{baseName}}'] = {{paramName}};
|
||||
{{/queryParams}}
|
||||
queryParams.removeWhere((key, value) => value == null);
|
||||
headerParams.removeWhere((key, value) => value == null);
|
||||
|
||||
List<String> contentTypes = [{{#consumes}}"{{{mediaType}}}"{{^-last}},{{/-last}}{{/consumes}}];
|
||||
|
||||
final List<String> contentTypes = [{{^hasConsumes}}];{{/hasConsumes}}{{#hasConsumes}}{{#consumes}}
|
||||
'{{{mediaType}}}',{{/consumes}}
|
||||
];{{/hasConsumes}}
|
||||
{{#hasFormParams}}
|
||||
|
||||
final Map<String, dynamic> formData = {};
|
||||
{{#isMultipart}}
|
||||
{{#formParams}}
|
||||
@ -63,39 +70,45 @@ class {{classname}} {
|
||||
bodyData = formData;
|
||||
{{/isMultipart}}
|
||||
{{/hasFormParams}}
|
||||
|
||||
{{#bodyParam}}
|
||||
|
||||
{{#isArray}}
|
||||
const type = FullType(BuiltList, [FullType({{baseType}})]);
|
||||
final serializedBody = _serializers.serialize({{paramName}}, specifiedType: type);
|
||||
const type = FullType(BuiltList, [FullType({{baseType}})]);
|
||||
final serializedBody = _serializers.serialize({{paramName}}, specifiedType: type);
|
||||
{{/isArray}}
|
||||
{{^isArray}}
|
||||
final serializedBody = _serializers.serialize({{paramName}});
|
||||
final serializedBody = _serializers.serialize({{paramName}});
|
||||
{{/isArray}}
|
||||
final json{{paramName}} = json.encode(serializedBody);
|
||||
bodyData = json{{paramName}};
|
||||
final json{{paramName}} = json.encode(serializedBody);
|
||||
bodyData = json{{paramName}};
|
||||
{{/bodyParam}}
|
||||
|
||||
return _dio.request(
|
||||
return _dio.request(
|
||||
_path,
|
||||
queryParameters: queryParams,
|
||||
data: bodyData,
|
||||
options: Options(
|
||||
method: '{{httpMethod}}'.toUpperCase(),
|
||||
{{#isResponseFile}}
|
||||
responseType: ResponseType.bytes,
|
||||
{{/isResponseFile}}
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [{{#authMethods}} {"type": "{{type}}", "name": "{{name}}"{{#isApiKey}}, "keyName": "{{keyParamName}}", "where": "{{#isKeyInQuery}}query{{/isKeyInQuery}}{{#isKeyInHeader}}header{{/isKeyInHeader}}"{{/isApiKey}} }{{^-last}}, {{/-last}}{{/authMethods}}],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json",
|
||||
method: '{{httpMethod}}'.toUpperCase(),
|
||||
{{#isResponseFile}}
|
||||
responseType: ResponseType.bytes,
|
||||
{{/isResponseFile}}
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [{{^hasAuthMethods}}],{{/hasAuthMethods}}{{#hasAuthMethods}}
|
||||
{{#authMethods}}{
|
||||
'type': '{{type}}',
|
||||
'name': '{{name}}',{{#isApiKey}}
|
||||
'keyName': '{{keyParamName}}',
|
||||
'where': '{{#isKeyInQuery}}query{{/isKeyInQuery}}{{#isKeyInHeader}}header{{/isKeyInHeader}}',{{/isApiKey}}
|
||||
},{{/authMethods}}
|
||||
],{{/hasAuthMethods}}
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : 'application/json',
|
||||
),
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
){{#returnType}}.then((response) {
|
||||
|
||||
){{#returnType}}.then((response) {
|
||||
{{#isResponseFile}}
|
||||
final data = response.data;
|
||||
{{/isResponseFile}}
|
||||
@ -125,8 +138,9 @@ class {{classname}} {
|
||||
statusMessage: response.statusMessage,
|
||||
extra: response.extra,
|
||||
);
|
||||
}){{/returnType}};
|
||||
}
|
||||
}){{/returnType}};
|
||||
}
|
||||
|
||||
{{/operation}}
|
||||
}
|
||||
}
|
||||
{{/operations}}
|
||||
|
@ -47,7 +47,7 @@ import 'package:{{pubName}}/api.dart';
|
||||
|
||||
var api_instance = new {{classname}}();
|
||||
{{#allParams}}
|
||||
var {{paramName}} = {{#isArray}}[{{/isArray}}{{#isBodyParam}}new {{dataType}}(){{/isBodyParam}}{{^isBodyParam}}{{{example}}}{{/isBodyParam}}{{#isArray}}]{{/isArray}}; // {{{dataType}}} | {{{description}}}
|
||||
var {{paramName}} = {{#isArray}}[{{/isArray}}{{#isBodyParam}}new {{{dataType}}}(){{/isBodyParam}}{{^isBodyParam}}{{{example}}}{{/isBodyParam}}{{#isArray}}]{{/isArray}}; // {{{dataType}}} | {{{description}}}
|
||||
{{/allParams}}
|
||||
|
||||
try {
|
||||
@ -56,7 +56,7 @@ try {
|
||||
print(result);
|
||||
{{/returnType}}
|
||||
} catch (e) {
|
||||
print("Exception when calling {{classname}}->{{operationId}}: $e\n");
|
||||
print('Exception when calling {{classname}}->{{operationId}}: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
@ -64,7 +64,7 @@ try {
|
||||
{{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}}
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}}
|
||||
{{#allParams}} **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{baseType}}.md){{/isPrimitiveType}}| {{description}} | {{^required}}[optional] {{/required}}{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}}
|
||||
{{#allParams}} **{{paramName}}** | {{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{{dataType}}}**]({{baseType}}.md){{/isPrimitiveType}}| {{{description}}} | {{^required}}[optional] {{/required}}{{#defaultValue}}[default to {{{defaultValue}}}]{{/defaultValue}}
|
||||
{{/allParams}}
|
||||
|
||||
### Return type
|
||||
|
@ -15,7 +15,7 @@ class {{clientName}} {
|
||||
|
||||
Dio dio;
|
||||
Serializers serializers;
|
||||
String basePath = "{{{basePath}}}";
|
||||
String basePath = '{{{basePath}}}';
|
||||
|
||||
{{clientName}}({this.dio, Serializers serializers, String basePathOverride, List<Interceptor> interceptors}) {
|
||||
if (dio == null) {
|
||||
|
@ -6,17 +6,19 @@ part '{{classFilename}}.g.dart';
|
||||
abstract class {{classname}} implements Built<{{classname}}, {{classname}}Builder> {
|
||||
|
||||
{{#vars}}
|
||||
{{#description}}/* {{{description}}} */{{/description}}
|
||||
{{#description}}
|
||||
/// {{{description}}}
|
||||
{{/description}}
|
||||
{{#isNullable}}
|
||||
@nullable
|
||||
{{/isNullable}}
|
||||
@BuiltValueField(wireName: r'{{baseName}}')
|
||||
{{{datatypeWithEnum}}} 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}}
|
||||
|
||||
{{/vars}}
|
||||
// Boilerplate code needed to wire-up generated code
|
||||
{{classname}}._();
|
||||
|
||||
@ -42,4 +44,4 @@ abstract class {{classname}} implements Built<{{classname}}, {{classname}}Builde
|
||||
{{/mostInnerItems}}
|
||||
{{/isContainer}}
|
||||
{{/isEnum}}
|
||||
{{/vars}}
|
||||
{{/vars}}
|
||||
|
@ -7,7 +7,7 @@ class OffsetDateSerializer implements PrimitiveSerializer<OffsetDate> {
|
||||
Iterable<Type> get types => BuiltList<Type>([OffsetDate]);
|
||||
|
||||
@override
|
||||
String get wireName => "OffsetDate";
|
||||
String get wireName => 'OffsetDate';
|
||||
|
||||
@override
|
||||
OffsetDate deserialize(Serializers serializers, Object serialized,
|
||||
@ -28,7 +28,7 @@ class OffsetDateTimeSerializer implements PrimitiveSerializer<OffsetDateTime> {
|
||||
Iterable<Type> get types => BuiltList<Type>([OffsetDateTime]);
|
||||
|
||||
@override
|
||||
String get wireName => "OffsetDateTime";
|
||||
String get wireName => 'OffsetDateTime';
|
||||
|
||||
@override
|
||||
OffsetDateTime deserialize(Serializers serializers, Object serialized,
|
||||
|
@ -8,7 +8,7 @@ import 'package:{{pubName}}/api.dart';
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}}
|
||||
{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{{dataType}}}**]({{complexType}}.md){{/isPrimitiveType}} | {{{description}}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}}
|
||||
{{/vars}}
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
@ -7,7 +7,9 @@ class {{{classname}}} {
|
||||
});
|
||||
|
||||
{{#vars}}
|
||||
{{#description}}/// {{{description}}}{{/description}}
|
||||
{{#description}}
|
||||
/// {{{description}}}
|
||||
{{/description}}
|
||||
{{^isEnum}}
|
||||
{{#minimum}}
|
||||
// minimum: {{{minimum}}}
|
||||
|
@ -11,8 +11,8 @@ Name | Type | Description | Notes
|
||||
**id** | **int** | | [optional] [default to null]
|
||||
**category** | [**Category**](Category.md) | | [optional] [default to null]
|
||||
**name** | **String** | | [default to null]
|
||||
**photoUrls** | **BuiltList<String>** | | [default to const []]
|
||||
**tags** | [**BuiltList<Tag>**](Tag.md) | | [optional] [default to const []]
|
||||
**photoUrls** | **BuiltList<String>** | | [default to const []]
|
||||
**tags** | [**BuiltList<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)
|
||||
|
@ -36,7 +36,7 @@ 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");
|
||||
print('Exception when calling PetApi->addPet: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
@ -79,7 +79,7 @@ var apiKey = apiKey_example; // String |
|
||||
try {
|
||||
api_instance.deletePet(petId, apiKey);
|
||||
} catch (e) {
|
||||
print("Exception when calling PetApi->deletePet: $e\n");
|
||||
print('Exception when calling PetApi->deletePet: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
@ -125,7 +125,7 @@ try {
|
||||
var result = api_instance.findPetsByStatus(status);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print("Exception when calling PetApi->findPetsByStatus: $e\n");
|
||||
print('Exception when calling PetApi->findPetsByStatus: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
@ -133,7 +133,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**status** | [**BuiltList<String>**](String.md)| Status values that need to be considered for filter | [default to const []]
|
||||
**status** | [**BuiltList<String>**](String.md)| Status values that need to be considered for filter | [default to const []]
|
||||
|
||||
### Return type
|
||||
|
||||
@ -170,7 +170,7 @@ try {
|
||||
var result = api_instance.findPetsByTags(tags);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print("Exception when calling PetApi->findPetsByTags: $e\n");
|
||||
print('Exception when calling PetApi->findPetsByTags: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
@ -178,7 +178,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**tags** | [**BuiltList<String>**](String.md)| Tags to filter by | [default to const []]
|
||||
**tags** | [**BuiltList<String>**](String.md)| Tags to filter by | [default to const []]
|
||||
|
||||
### Return type
|
||||
|
||||
@ -217,7 +217,7 @@ try {
|
||||
var result = api_instance.getPetById(petId);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print("Exception when calling PetApi->getPetById: $e\n");
|
||||
print('Exception when calling PetApi->getPetById: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
@ -259,7 +259,7 @@ 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");
|
||||
print('Exception when calling PetApi->updatePet: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
@ -303,7 +303,7 @@ 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");
|
||||
print('Exception when calling PetApi->updatePetWithForm: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
@ -350,7 +350,7 @@ try {
|
||||
var result = api_instance.uploadFile(petId, additionalMetadata, file);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print("Exception when calling PetApi->uploadFile: $e\n");
|
||||
print('Exception when calling PetApi->uploadFile: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -32,7 +32,7 @@ var orderId = orderId_example; // String | ID of the order that needs to be dele
|
||||
try {
|
||||
api_instance.deleteOrder(orderId);
|
||||
} catch (e) {
|
||||
print("Exception when calling StoreApi->deleteOrder: $e\n");
|
||||
print('Exception when calling StoreApi->deleteOrder: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
@ -78,7 +78,7 @@ try {
|
||||
var result = api_instance.getInventory();
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print("Exception when calling StoreApi->getInventory: $e\n");
|
||||
print('Exception when calling StoreApi->getInventory: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
@ -118,7 +118,7 @@ try {
|
||||
var result = api_instance.getOrderById(orderId);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print("Exception when calling StoreApi->getOrderById: $e\n");
|
||||
print('Exception when calling StoreApi->getOrderById: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
@ -159,7 +159,7 @@ try {
|
||||
var result = api_instance.placeOrder(body);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print("Exception when calling StoreApi->placeOrder: $e\n");
|
||||
print('Exception when calling StoreApi->placeOrder: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -36,7 +36,7 @@ var body = new User(); // User | Created user object
|
||||
try {
|
||||
api_instance.createUser(body);
|
||||
} catch (e) {
|
||||
print("Exception when calling UserApi->createUser: $e\n");
|
||||
print('Exception when calling UserApi->createUser: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
@ -71,12 +71,12 @@ Creates list of users with given input array
|
||||
import 'package:openapi/api.dart';
|
||||
|
||||
var api_instance = new UserApi();
|
||||
var body = [new BuiltList<User>()]; // BuiltList<User> | List of user object
|
||||
var body = [new BuiltList<User>()]; // BuiltList<User> | List of user object
|
||||
|
||||
try {
|
||||
api_instance.createUsersWithArrayInput(body);
|
||||
} catch (e) {
|
||||
print("Exception when calling UserApi->createUsersWithArrayInput: $e\n");
|
||||
print('Exception when calling UserApi->createUsersWithArrayInput: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
@ -84,7 +84,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**BuiltList<User>**](User.md)| List of user object |
|
||||
**body** | [**BuiltList<User>**](User.md)| List of user object |
|
||||
|
||||
### Return type
|
||||
|
||||
@ -111,12 +111,12 @@ Creates list of users with given input array
|
||||
import 'package:openapi/api.dart';
|
||||
|
||||
var api_instance = new UserApi();
|
||||
var body = [new BuiltList<User>()]; // BuiltList<User> | List of user object
|
||||
var body = [new BuiltList<User>()]; // BuiltList<User> | List of user object
|
||||
|
||||
try {
|
||||
api_instance.createUsersWithListInput(body);
|
||||
} catch (e) {
|
||||
print("Exception when calling UserApi->createUsersWithListInput: $e\n");
|
||||
print('Exception when calling UserApi->createUsersWithListInput: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
@ -124,7 +124,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**BuiltList<User>**](User.md)| List of user object |
|
||||
**body** | [**BuiltList<User>**](User.md)| List of user object |
|
||||
|
||||
### Return type
|
||||
|
||||
@ -158,7 +158,7 @@ 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");
|
||||
print('Exception when calling UserApi->deleteUser: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
@ -199,7 +199,7 @@ try {
|
||||
var result = api_instance.getUserByName(username);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print("Exception when calling UserApi->getUserByName: $e\n");
|
||||
print('Exception when calling UserApi->getUserByName: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
@ -241,7 +241,7 @@ try {
|
||||
var result = api_instance.loginUser(username, password);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print("Exception when calling UserApi->loginUser: $e\n");
|
||||
print('Exception when calling UserApi->loginUser: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
@ -281,7 +281,7 @@ var api_instance = new UserApi();
|
||||
try {
|
||||
api_instance.logoutUser();
|
||||
} catch (e) {
|
||||
print("Exception when calling UserApi->logoutUser: $e\n");
|
||||
print('Exception when calling UserApi->logoutUser: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
@ -321,7 +321,7 @@ var body = new User(); // User | Updated user object
|
||||
try {
|
||||
api_instance.updateUser(username, body);
|
||||
} catch (e) {
|
||||
print("Exception when calling UserApi->updateUser: $e\n");
|
||||
print('Exception when calling UserApi->updateUser: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -17,7 +17,7 @@ class Openapi {
|
||||
|
||||
Dio dio;
|
||||
Serializers serializers;
|
||||
String basePath = "http://petstore.swagger.io/v2";
|
||||
String basePath = 'http://petstore.swagger.io/v2';
|
||||
|
||||
Openapi({this.dio, Serializers serializers, String basePathOverride, List<Interceptor> interceptors}) {
|
||||
if (dio == null) {
|
||||
|
@ -1,5 +1,4 @@
|
||||
import 'dart:async';
|
||||
import 'dart:io';
|
||||
import 'dart:convert';
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
@ -16,116 +15,146 @@ class PetApi {
|
||||
|
||||
PetApi(this._dio, this._serializers);
|
||||
|
||||
/// Add a new pet to the store
|
||||
///
|
||||
///
|
||||
Future<Response>addPet(Pet body,{ CancelToken cancelToken, Map<String, String> headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async {
|
||||
/// Add a new pet to the store
|
||||
///
|
||||
///
|
||||
Future<Response>addPet(
|
||||
Pet body, {
|
||||
CancelToken cancelToken,
|
||||
Map<String, String> headers,
|
||||
ProgressCallback onSendProgress,
|
||||
ProgressCallback onReceiveProgress,
|
||||
}) async {
|
||||
final String _path = '/pet';
|
||||
|
||||
String _path = "/pet";
|
||||
|
||||
Map<String, dynamic> queryParams = {};
|
||||
Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
final Map<String, dynamic> queryParams = {};
|
||||
final Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
dynamic bodyData;
|
||||
|
||||
queryParams.removeWhere((key, value) => value == null);
|
||||
headerParams.removeWhere((key, value) => value == null);
|
||||
|
||||
List<String> contentTypes = ["application/json","application/xml"];
|
||||
final List<String> contentTypes = [
|
||||
'application/json',
|
||||
'application/xml',
|
||||
];
|
||||
|
||||
final serializedBody = _serializers.serialize(body);
|
||||
final jsonbody = json.encode(serializedBody);
|
||||
bodyData = jsonbody;
|
||||
|
||||
final serializedBody = _serializers.serialize(body);
|
||||
final jsonbody = json.encode(serializedBody);
|
||||
bodyData = jsonbody;
|
||||
|
||||
return _dio.request(
|
||||
return _dio.request(
|
||||
_path,
|
||||
queryParameters: queryParams,
|
||||
data: bodyData,
|
||||
options: Options(
|
||||
method: 'post'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [ {"type": "oauth2", "name": "petstore_auth" }],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json",
|
||||
method: 'post'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [
|
||||
{
|
||||
'type': 'oauth2',
|
||||
'name': 'petstore_auth',
|
||||
},
|
||||
],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : 'application/json',
|
||||
),
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
}
|
||||
/// Deletes a pet
|
||||
///
|
||||
///
|
||||
Future<Response>deletePet(int petId,{ String apiKey,CancelToken cancelToken, Map<String, String> headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async {
|
||||
);
|
||||
}
|
||||
|
||||
String _path = "/pet/{petId}".replaceAll("{" r'petId' "}", petId.toString());
|
||||
/// Deletes a pet
|
||||
///
|
||||
///
|
||||
Future<Response>deletePet(
|
||||
int petId, {
|
||||
String apiKey,
|
||||
CancelToken cancelToken,
|
||||
Map<String, String> headers,
|
||||
ProgressCallback onSendProgress,
|
||||
ProgressCallback onReceiveProgress,
|
||||
}) async {
|
||||
final String _path = '/pet/{petId}'.replaceAll('{' r'petId' '}', petId.toString());
|
||||
|
||||
Map<String, dynamic> queryParams = {};
|
||||
Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
final Map<String, dynamic> queryParams = {};
|
||||
final Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
dynamic bodyData;
|
||||
|
||||
headerParams[r'api_key'] = apiKey;
|
||||
headerParams[r'api_key'] = apiKey;
|
||||
queryParams.removeWhere((key, value) => value == null);
|
||||
headerParams.removeWhere((key, value) => value == null);
|
||||
|
||||
List<String> contentTypes = [];
|
||||
final List<String> contentTypes = [];
|
||||
|
||||
|
||||
|
||||
return _dio.request(
|
||||
return _dio.request(
|
||||
_path,
|
||||
queryParameters: queryParams,
|
||||
data: bodyData,
|
||||
options: Options(
|
||||
method: 'delete'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [ {"type": "oauth2", "name": "petstore_auth" }],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json",
|
||||
method: 'delete'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [
|
||||
{
|
||||
'type': 'oauth2',
|
||||
'name': 'petstore_auth',
|
||||
},
|
||||
],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : 'application/json',
|
||||
),
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
}
|
||||
/// Finds Pets by status
|
||||
///
|
||||
/// Multiple status values can be provided with comma separated strings
|
||||
Future<Response<BuiltList<Pet>>>findPetsByStatus(BuiltList<String> status,{ CancelToken cancelToken, Map<String, String> headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async {
|
||||
);
|
||||
}
|
||||
|
||||
String _path = "/pet/findByStatus";
|
||||
/// Finds Pets by status
|
||||
///
|
||||
/// Multiple status values can be provided with comma separated strings
|
||||
Future<Response<BuiltList<Pet>>>findPetsByStatus(
|
||||
BuiltList<String> status, {
|
||||
CancelToken cancelToken,
|
||||
Map<String, String> headers,
|
||||
ProgressCallback onSendProgress,
|
||||
ProgressCallback onReceiveProgress,
|
||||
}) async {
|
||||
final String _path = '/pet/findByStatus';
|
||||
|
||||
Map<String, dynamic> queryParams = {};
|
||||
Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
final Map<String, dynamic> queryParams = {};
|
||||
final Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
dynamic bodyData;
|
||||
|
||||
queryParams[r'status'] = status;
|
||||
queryParams[r'status'] = status;
|
||||
queryParams.removeWhere((key, value) => value == null);
|
||||
headerParams.removeWhere((key, value) => value == null);
|
||||
|
||||
List<String> contentTypes = [];
|
||||
final List<String> contentTypes = [];
|
||||
|
||||
|
||||
|
||||
return _dio.request(
|
||||
return _dio.request(
|
||||
_path,
|
||||
queryParameters: queryParams,
|
||||
data: bodyData,
|
||||
options: Options(
|
||||
method: 'get'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [ {"type": "oauth2", "name": "petstore_auth" }],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json",
|
||||
method: 'get'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [
|
||||
{
|
||||
'type': 'oauth2',
|
||||
'name': 'petstore_auth',
|
||||
},
|
||||
],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : 'application/json',
|
||||
),
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
).then((response) {
|
||||
|
||||
).then((response) {
|
||||
const collectionType = BuiltList;
|
||||
const type = FullType(collectionType, [FullType(Pet)]);
|
||||
final BuiltList<Pet> data = _serializers.deserialize(response.data is String ? jsonDecode(response.data) : response.data, specifiedType: type);
|
||||
@ -139,44 +168,52 @@ class PetApi {
|
||||
statusMessage: response.statusMessage,
|
||||
extra: response.extra,
|
||||
);
|
||||
});
|
||||
}
|
||||
/// Finds Pets by tags
|
||||
///
|
||||
/// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
Future<Response<BuiltList<Pet>>>findPetsByTags(BuiltList<String> tags,{ CancelToken cancelToken, Map<String, String> headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async {
|
||||
});
|
||||
}
|
||||
|
||||
String _path = "/pet/findByTags";
|
||||
/// Finds Pets by tags
|
||||
///
|
||||
/// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
Future<Response<BuiltList<Pet>>>findPetsByTags(
|
||||
BuiltList<String> tags, {
|
||||
CancelToken cancelToken,
|
||||
Map<String, String> headers,
|
||||
ProgressCallback onSendProgress,
|
||||
ProgressCallback onReceiveProgress,
|
||||
}) async {
|
||||
final String _path = '/pet/findByTags';
|
||||
|
||||
Map<String, dynamic> queryParams = {};
|
||||
Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
final Map<String, dynamic> queryParams = {};
|
||||
final Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
dynamic bodyData;
|
||||
|
||||
queryParams[r'tags'] = tags;
|
||||
queryParams[r'tags'] = tags;
|
||||
queryParams.removeWhere((key, value) => value == null);
|
||||
headerParams.removeWhere((key, value) => value == null);
|
||||
|
||||
List<String> contentTypes = [];
|
||||
final List<String> contentTypes = [];
|
||||
|
||||
|
||||
|
||||
return _dio.request(
|
||||
return _dio.request(
|
||||
_path,
|
||||
queryParameters: queryParams,
|
||||
data: bodyData,
|
||||
options: Options(
|
||||
method: 'get'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [ {"type": "oauth2", "name": "petstore_auth" }],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json",
|
||||
method: 'get'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [
|
||||
{
|
||||
'type': 'oauth2',
|
||||
'name': 'petstore_auth',
|
||||
},
|
||||
],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : 'application/json',
|
||||
),
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
).then((response) {
|
||||
|
||||
).then((response) {
|
||||
const collectionType = BuiltList;
|
||||
const type = FullType(collectionType, [FullType(Pet)]);
|
||||
final BuiltList<Pet> data = _serializers.deserialize(response.data is String ? jsonDecode(response.data) : response.data, specifiedType: type);
|
||||
@ -190,43 +227,53 @@ class PetApi {
|
||||
statusMessage: response.statusMessage,
|
||||
extra: response.extra,
|
||||
);
|
||||
});
|
||||
}
|
||||
/// Find pet by ID
|
||||
///
|
||||
/// Returns a single pet
|
||||
Future<Response<Pet>>getPetById(int petId,{ CancelToken cancelToken, Map<String, String> headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async {
|
||||
});
|
||||
}
|
||||
|
||||
String _path = "/pet/{petId}".replaceAll("{" r'petId' "}", petId.toString());
|
||||
/// Find pet by ID
|
||||
///
|
||||
/// Returns a single pet
|
||||
Future<Response<Pet>>getPetById(
|
||||
int petId, {
|
||||
CancelToken cancelToken,
|
||||
Map<String, String> headers,
|
||||
ProgressCallback onSendProgress,
|
||||
ProgressCallback onReceiveProgress,
|
||||
}) async {
|
||||
final String _path = '/pet/{petId}'.replaceAll('{' r'petId' '}', petId.toString());
|
||||
|
||||
Map<String, dynamic> queryParams = {};
|
||||
Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
final Map<String, dynamic> queryParams = {};
|
||||
final Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
dynamic bodyData;
|
||||
|
||||
queryParams.removeWhere((key, value) => value == null);
|
||||
headerParams.removeWhere((key, value) => value == null);
|
||||
|
||||
List<String> contentTypes = [];
|
||||
final List<String> contentTypes = [];
|
||||
|
||||
|
||||
|
||||
return _dio.request(
|
||||
return _dio.request(
|
||||
_path,
|
||||
queryParameters: queryParams,
|
||||
data: bodyData,
|
||||
options: Options(
|
||||
method: 'get'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [ {"type": "apiKey", "name": "api_key", "keyName": "api_key", "where": "header" }],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json",
|
||||
method: 'get'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'api_key',
|
||||
'where': 'header',
|
||||
},
|
||||
],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : 'application/json',
|
||||
),
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
).then((response) {
|
||||
|
||||
).then((response) {
|
||||
final serializer = _serializers.serializerForType(Pet);
|
||||
final data = _serializers.deserializeWith<Pet>(serializer, response.data is String ? jsonDecode(response.data) : response.data);
|
||||
|
||||
@ -239,100 +286,137 @@ class PetApi {
|
||||
statusMessage: response.statusMessage,
|
||||
extra: response.extra,
|
||||
);
|
||||
});
|
||||
}
|
||||
/// Update an existing pet
|
||||
///
|
||||
///
|
||||
Future<Response>updatePet(Pet body,{ CancelToken cancelToken, Map<String, String> headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async {
|
||||
});
|
||||
}
|
||||
|
||||
String _path = "/pet";
|
||||
/// Update an existing pet
|
||||
///
|
||||
///
|
||||
Future<Response>updatePet(
|
||||
Pet body, {
|
||||
CancelToken cancelToken,
|
||||
Map<String, String> headers,
|
||||
ProgressCallback onSendProgress,
|
||||
ProgressCallback onReceiveProgress,
|
||||
}) async {
|
||||
final String _path = '/pet';
|
||||
|
||||
Map<String, dynamic> queryParams = {};
|
||||
Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
final Map<String, dynamic> queryParams = {};
|
||||
final Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
dynamic bodyData;
|
||||
|
||||
queryParams.removeWhere((key, value) => value == null);
|
||||
headerParams.removeWhere((key, value) => value == null);
|
||||
|
||||
List<String> contentTypes = ["application/json","application/xml"];
|
||||
final List<String> contentTypes = [
|
||||
'application/json',
|
||||
'application/xml',
|
||||
];
|
||||
|
||||
final serializedBody = _serializers.serialize(body);
|
||||
final jsonbody = json.encode(serializedBody);
|
||||
bodyData = jsonbody;
|
||||
|
||||
final serializedBody = _serializers.serialize(body);
|
||||
final jsonbody = json.encode(serializedBody);
|
||||
bodyData = jsonbody;
|
||||
|
||||
return _dio.request(
|
||||
return _dio.request(
|
||||
_path,
|
||||
queryParameters: queryParams,
|
||||
data: bodyData,
|
||||
options: Options(
|
||||
method: 'put'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [ {"type": "oauth2", "name": "petstore_auth" }],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json",
|
||||
method: 'put'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [
|
||||
{
|
||||
'type': 'oauth2',
|
||||
'name': 'petstore_auth',
|
||||
},
|
||||
],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : 'application/json',
|
||||
),
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
}
|
||||
/// Updates a pet in the store with form data
|
||||
///
|
||||
///
|
||||
Future<Response>updatePetWithForm(int petId,{ String name,String status,CancelToken cancelToken, Map<String, String> headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async {
|
||||
);
|
||||
}
|
||||
|
||||
String _path = "/pet/{petId}".replaceAll("{" r'petId' "}", petId.toString());
|
||||
/// Updates a pet in the store with form data
|
||||
///
|
||||
///
|
||||
Future<Response>updatePetWithForm(
|
||||
int petId, {
|
||||
String name,
|
||||
String status,
|
||||
CancelToken cancelToken,
|
||||
Map<String, String> headers,
|
||||
ProgressCallback onSendProgress,
|
||||
ProgressCallback onReceiveProgress,
|
||||
}) async {
|
||||
final String _path = '/pet/{petId}'.replaceAll('{' r'petId' '}', petId.toString());
|
||||
|
||||
Map<String, dynamic> queryParams = {};
|
||||
Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
final Map<String, dynamic> queryParams = {};
|
||||
final Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
dynamic bodyData;
|
||||
|
||||
queryParams.removeWhere((key, value) => value == null);
|
||||
headerParams.removeWhere((key, value) => value == null);
|
||||
|
||||
List<String> contentTypes = ["application/x-www-form-urlencoded"];
|
||||
final List<String> contentTypes = [
|
||||
'application/x-www-form-urlencoded',
|
||||
];
|
||||
|
||||
final Map<String, dynamic> formData = {};
|
||||
formData['name'] = parameterToString(_serializers, name);
|
||||
formData['status'] = parameterToString(_serializers, status);
|
||||
bodyData = formData;
|
||||
|
||||
|
||||
return _dio.request(
|
||||
return _dio.request(
|
||||
_path,
|
||||
queryParameters: queryParams,
|
||||
data: bodyData,
|
||||
options: Options(
|
||||
method: 'post'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [ {"type": "oauth2", "name": "petstore_auth" }],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json",
|
||||
method: 'post'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [
|
||||
{
|
||||
'type': 'oauth2',
|
||||
'name': 'petstore_auth',
|
||||
},
|
||||
],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : 'application/json',
|
||||
),
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
}
|
||||
/// uploads an image
|
||||
///
|
||||
///
|
||||
Future<Response<ApiResponse>>uploadFile(int petId,{ String additionalMetadata,Uint8List file,CancelToken cancelToken, Map<String, String> headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async {
|
||||
);
|
||||
}
|
||||
|
||||
String _path = "/pet/{petId}/uploadImage".replaceAll("{" r'petId' "}", petId.toString());
|
||||
/// uploads an image
|
||||
///
|
||||
///
|
||||
Future<Response<ApiResponse>>uploadFile(
|
||||
int petId, {
|
||||
String additionalMetadata,
|
||||
Uint8List file,
|
||||
CancelToken cancelToken,
|
||||
Map<String, String> headers,
|
||||
ProgressCallback onSendProgress,
|
||||
ProgressCallback onReceiveProgress,
|
||||
}) async {
|
||||
final String _path = '/pet/{petId}/uploadImage'.replaceAll('{' r'petId' '}', petId.toString());
|
||||
|
||||
Map<String, dynamic> queryParams = {};
|
||||
Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
final Map<String, dynamic> queryParams = {};
|
||||
final Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
dynamic bodyData;
|
||||
|
||||
queryParams.removeWhere((key, value) => value == null);
|
||||
headerParams.removeWhere((key, value) => value == null);
|
||||
|
||||
List<String> contentTypes = ["multipart/form-data"];
|
||||
final List<String> contentTypes = [
|
||||
'multipart/form-data',
|
||||
];
|
||||
|
||||
final Map<String, dynamic> formData = {};
|
||||
if (additionalMetadata != null) {
|
||||
@ -343,24 +427,27 @@ class PetApi {
|
||||
}
|
||||
bodyData = FormData.fromMap(formData);
|
||||
|
||||
|
||||
return _dio.request(
|
||||
return _dio.request(
|
||||
_path,
|
||||
queryParameters: queryParams,
|
||||
data: bodyData,
|
||||
options: Options(
|
||||
method: 'post'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [ {"type": "oauth2", "name": "petstore_auth" }],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json",
|
||||
method: 'post'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [
|
||||
{
|
||||
'type': 'oauth2',
|
||||
'name': 'petstore_auth',
|
||||
},
|
||||
],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : 'application/json',
|
||||
),
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
).then((response) {
|
||||
|
||||
).then((response) {
|
||||
final serializer = _serializers.serializerForType(ApiResponse);
|
||||
final data = _serializers.deserializeWith<ApiResponse>(serializer, response.data is String ? jsonDecode(response.data) : response.data);
|
||||
|
||||
@ -373,6 +460,7 @@ class PetApi {
|
||||
statusMessage: response.statusMessage,
|
||||
extra: response.extra,
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,5 +1,4 @@
|
||||
import 'dart:async';
|
||||
import 'dart:io';
|
||||
import 'dart:convert';
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
@ -13,76 +12,88 @@ class StoreApi {
|
||||
|
||||
StoreApi(this._dio, this._serializers);
|
||||
|
||||
/// Delete purchase order by ID
|
||||
///
|
||||
/// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
Future<Response>deleteOrder(String orderId,{ CancelToken cancelToken, Map<String, String> headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async {
|
||||
/// Delete purchase order by ID
|
||||
///
|
||||
/// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
Future<Response>deleteOrder(
|
||||
String orderId, {
|
||||
CancelToken cancelToken,
|
||||
Map<String, String> headers,
|
||||
ProgressCallback onSendProgress,
|
||||
ProgressCallback onReceiveProgress,
|
||||
}) async {
|
||||
final String _path = '/store/order/{orderId}'.replaceAll('{' r'orderId' '}', orderId.toString());
|
||||
|
||||
String _path = "/store/order/{orderId}".replaceAll("{" r'orderId' "}", orderId.toString());
|
||||
|
||||
Map<String, dynamic> queryParams = {};
|
||||
Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
final Map<String, dynamic> queryParams = {};
|
||||
final Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
dynamic bodyData;
|
||||
|
||||
queryParams.removeWhere((key, value) => value == null);
|
||||
headerParams.removeWhere((key, value) => value == null);
|
||||
|
||||
List<String> contentTypes = [];
|
||||
final List<String> contentTypes = [];
|
||||
|
||||
|
||||
|
||||
return _dio.request(
|
||||
return _dio.request(
|
||||
_path,
|
||||
queryParameters: queryParams,
|
||||
data: bodyData,
|
||||
options: Options(
|
||||
method: 'delete'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json",
|
||||
method: 'delete'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : 'application/json',
|
||||
),
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
}
|
||||
/// Returns pet inventories by status
|
||||
///
|
||||
/// Returns a map of status codes to quantities
|
||||
Future<Response<BuiltMap<String, int>>>getInventory({ CancelToken cancelToken, Map<String, String> headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async {
|
||||
);
|
||||
}
|
||||
|
||||
String _path = "/store/inventory";
|
||||
/// Returns pet inventories by status
|
||||
///
|
||||
/// Returns a map of status codes to quantities
|
||||
Future<Response<BuiltMap<String, int>>>getInventory({
|
||||
CancelToken cancelToken,
|
||||
Map<String, String> headers,
|
||||
ProgressCallback onSendProgress,
|
||||
ProgressCallback onReceiveProgress,
|
||||
}) async {
|
||||
final String _path = '/store/inventory';
|
||||
|
||||
Map<String, dynamic> queryParams = {};
|
||||
Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
final Map<String, dynamic> queryParams = {};
|
||||
final Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
dynamic bodyData;
|
||||
|
||||
queryParams.removeWhere((key, value) => value == null);
|
||||
headerParams.removeWhere((key, value) => value == null);
|
||||
|
||||
List<String> contentTypes = [];
|
||||
final List<String> contentTypes = [];
|
||||
|
||||
|
||||
|
||||
return _dio.request(
|
||||
return _dio.request(
|
||||
_path,
|
||||
queryParameters: queryParams,
|
||||
data: bodyData,
|
||||
options: Options(
|
||||
method: 'get'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [ {"type": "apiKey", "name": "api_key", "keyName": "api_key", "where": "header" }],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json",
|
||||
method: 'get'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'api_key',
|
||||
'where': 'header',
|
||||
},
|
||||
],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : 'application/json',
|
||||
),
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
).then((response) {
|
||||
|
||||
).then((response) {
|
||||
const collectionType = BuiltMap;
|
||||
const type = FullType(collectionType, [FullType(String), FullType(int)]);
|
||||
final BuiltMap<String, int> data = _serializers.deserialize(response.data is String ? jsonDecode(response.data) : response.data, specifiedType: type);
|
||||
@ -96,43 +107,46 @@ class StoreApi {
|
||||
statusMessage: response.statusMessage,
|
||||
extra: response.extra,
|
||||
);
|
||||
});
|
||||
}
|
||||
/// Find purchase order by ID
|
||||
///
|
||||
/// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
Future<Response<Order>>getOrderById(int orderId,{ CancelToken cancelToken, Map<String, String> headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async {
|
||||
});
|
||||
}
|
||||
|
||||
String _path = "/store/order/{orderId}".replaceAll("{" r'orderId' "}", orderId.toString());
|
||||
/// Find purchase order by ID
|
||||
///
|
||||
/// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
Future<Response<Order>>getOrderById(
|
||||
int orderId, {
|
||||
CancelToken cancelToken,
|
||||
Map<String, String> headers,
|
||||
ProgressCallback onSendProgress,
|
||||
ProgressCallback onReceiveProgress,
|
||||
}) async {
|
||||
final String _path = '/store/order/{orderId}'.replaceAll('{' r'orderId' '}', orderId.toString());
|
||||
|
||||
Map<String, dynamic> queryParams = {};
|
||||
Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
final Map<String, dynamic> queryParams = {};
|
||||
final Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
dynamic bodyData;
|
||||
|
||||
queryParams.removeWhere((key, value) => value == null);
|
||||
headerParams.removeWhere((key, value) => value == null);
|
||||
|
||||
List<String> contentTypes = [];
|
||||
final List<String> contentTypes = [];
|
||||
|
||||
|
||||
|
||||
return _dio.request(
|
||||
return _dio.request(
|
||||
_path,
|
||||
queryParameters: queryParams,
|
||||
data: bodyData,
|
||||
options: Options(
|
||||
method: 'get'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json",
|
||||
method: 'get'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : 'application/json',
|
||||
),
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
).then((response) {
|
||||
|
||||
).then((response) {
|
||||
final serializer = _serializers.serializerForType(Order);
|
||||
final data = _serializers.deserializeWith<Order>(serializer, response.data is String ? jsonDecode(response.data) : response.data);
|
||||
|
||||
@ -145,46 +159,50 @@ class StoreApi {
|
||||
statusMessage: response.statusMessage,
|
||||
extra: response.extra,
|
||||
);
|
||||
});
|
||||
}
|
||||
/// Place an order for a pet
|
||||
///
|
||||
///
|
||||
Future<Response<Order>>placeOrder(Order body,{ CancelToken cancelToken, Map<String, String> headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async {
|
||||
});
|
||||
}
|
||||
|
||||
String _path = "/store/order";
|
||||
/// Place an order for a pet
|
||||
///
|
||||
///
|
||||
Future<Response<Order>>placeOrder(
|
||||
Order body, {
|
||||
CancelToken cancelToken,
|
||||
Map<String, String> headers,
|
||||
ProgressCallback onSendProgress,
|
||||
ProgressCallback onReceiveProgress,
|
||||
}) async {
|
||||
final String _path = '/store/order';
|
||||
|
||||
Map<String, dynamic> queryParams = {};
|
||||
Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
final Map<String, dynamic> queryParams = {};
|
||||
final Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
dynamic bodyData;
|
||||
|
||||
queryParams.removeWhere((key, value) => value == null);
|
||||
headerParams.removeWhere((key, value) => value == null);
|
||||
|
||||
List<String> contentTypes = [];
|
||||
final List<String> contentTypes = [];
|
||||
|
||||
final serializedBody = _serializers.serialize(body);
|
||||
final jsonbody = json.encode(serializedBody);
|
||||
bodyData = jsonbody;
|
||||
|
||||
final serializedBody = _serializers.serialize(body);
|
||||
final jsonbody = json.encode(serializedBody);
|
||||
bodyData = jsonbody;
|
||||
|
||||
return _dio.request(
|
||||
return _dio.request(
|
||||
_path,
|
||||
queryParameters: queryParams,
|
||||
data: bodyData,
|
||||
options: Options(
|
||||
method: 'post'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json",
|
||||
method: 'post'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : 'application/json',
|
||||
),
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
).then((response) {
|
||||
|
||||
).then((response) {
|
||||
final serializer = _serializers.serializerForType(Order);
|
||||
final data = _serializers.deserializeWith<Order>(serializer, response.data is String ? jsonDecode(response.data) : response.data);
|
||||
|
||||
@ -197,6 +215,7 @@ class StoreApi {
|
||||
statusMessage: response.statusMessage,
|
||||
extra: response.extra,
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,5 +1,4 @@
|
||||
import 'dart:async';
|
||||
import 'dart:io';
|
||||
import 'dart:convert';
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
@ -13,192 +12,213 @@ class UserApi {
|
||||
|
||||
UserApi(this._dio, this._serializers);
|
||||
|
||||
/// Create user
|
||||
///
|
||||
/// This can only be done by the logged in user.
|
||||
Future<Response>createUser(User body,{ CancelToken cancelToken, Map<String, String> headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async {
|
||||
/// Create user
|
||||
///
|
||||
/// This can only be done by the logged in user.
|
||||
Future<Response>createUser(
|
||||
User body, {
|
||||
CancelToken cancelToken,
|
||||
Map<String, String> headers,
|
||||
ProgressCallback onSendProgress,
|
||||
ProgressCallback onReceiveProgress,
|
||||
}) async {
|
||||
final String _path = '/user';
|
||||
|
||||
String _path = "/user";
|
||||
|
||||
Map<String, dynamic> queryParams = {};
|
||||
Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
final Map<String, dynamic> queryParams = {};
|
||||
final Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
dynamic bodyData;
|
||||
|
||||
queryParams.removeWhere((key, value) => value == null);
|
||||
headerParams.removeWhere((key, value) => value == null);
|
||||
|
||||
List<String> contentTypes = [];
|
||||
final List<String> contentTypes = [];
|
||||
|
||||
final serializedBody = _serializers.serialize(body);
|
||||
final jsonbody = json.encode(serializedBody);
|
||||
bodyData = jsonbody;
|
||||
|
||||
final serializedBody = _serializers.serialize(body);
|
||||
final jsonbody = json.encode(serializedBody);
|
||||
bodyData = jsonbody;
|
||||
|
||||
return _dio.request(
|
||||
return _dio.request(
|
||||
_path,
|
||||
queryParameters: queryParams,
|
||||
data: bodyData,
|
||||
options: Options(
|
||||
method: 'post'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json",
|
||||
method: 'post'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : 'application/json',
|
||||
),
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
}
|
||||
/// Creates list of users with given input array
|
||||
///
|
||||
///
|
||||
Future<Response>createUsersWithArrayInput(BuiltList<User> body,{ CancelToken cancelToken, Map<String, String> headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async {
|
||||
);
|
||||
}
|
||||
|
||||
String _path = "/user/createWithArray";
|
||||
/// Creates list of users with given input array
|
||||
///
|
||||
///
|
||||
Future<Response>createUsersWithArrayInput(
|
||||
BuiltList<User> body, {
|
||||
CancelToken cancelToken,
|
||||
Map<String, String> headers,
|
||||
ProgressCallback onSendProgress,
|
||||
ProgressCallback onReceiveProgress,
|
||||
}) async {
|
||||
final String _path = '/user/createWithArray';
|
||||
|
||||
Map<String, dynamic> queryParams = {};
|
||||
Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
final Map<String, dynamic> queryParams = {};
|
||||
final Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
dynamic bodyData;
|
||||
|
||||
queryParams.removeWhere((key, value) => value == null);
|
||||
headerParams.removeWhere((key, value) => value == null);
|
||||
|
||||
List<String> contentTypes = [];
|
||||
final List<String> contentTypes = [];
|
||||
|
||||
const type = FullType(BuiltList, [FullType(User)]);
|
||||
final serializedBody = _serializers.serialize(body, specifiedType: type);
|
||||
final jsonbody = json.encode(serializedBody);
|
||||
bodyData = jsonbody;
|
||||
|
||||
const type = FullType(BuiltList, [FullType(User)]);
|
||||
final serializedBody = _serializers.serialize(body, specifiedType: type);
|
||||
final jsonbody = json.encode(serializedBody);
|
||||
bodyData = jsonbody;
|
||||
|
||||
return _dio.request(
|
||||
return _dio.request(
|
||||
_path,
|
||||
queryParameters: queryParams,
|
||||
data: bodyData,
|
||||
options: Options(
|
||||
method: 'post'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json",
|
||||
method: 'post'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : 'application/json',
|
||||
),
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
}
|
||||
/// Creates list of users with given input array
|
||||
///
|
||||
///
|
||||
Future<Response>createUsersWithListInput(BuiltList<User> body,{ CancelToken cancelToken, Map<String, String> headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async {
|
||||
);
|
||||
}
|
||||
|
||||
String _path = "/user/createWithList";
|
||||
/// Creates list of users with given input array
|
||||
///
|
||||
///
|
||||
Future<Response>createUsersWithListInput(
|
||||
BuiltList<User> body, {
|
||||
CancelToken cancelToken,
|
||||
Map<String, String> headers,
|
||||
ProgressCallback onSendProgress,
|
||||
ProgressCallback onReceiveProgress,
|
||||
}) async {
|
||||
final String _path = '/user/createWithList';
|
||||
|
||||
Map<String, dynamic> queryParams = {};
|
||||
Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
final Map<String, dynamic> queryParams = {};
|
||||
final Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
dynamic bodyData;
|
||||
|
||||
queryParams.removeWhere((key, value) => value == null);
|
||||
headerParams.removeWhere((key, value) => value == null);
|
||||
|
||||
List<String> contentTypes = [];
|
||||
final List<String> contentTypes = [];
|
||||
|
||||
const type = FullType(BuiltList, [FullType(User)]);
|
||||
final serializedBody = _serializers.serialize(body, specifiedType: type);
|
||||
final jsonbody = json.encode(serializedBody);
|
||||
bodyData = jsonbody;
|
||||
|
||||
const type = FullType(BuiltList, [FullType(User)]);
|
||||
final serializedBody = _serializers.serialize(body, specifiedType: type);
|
||||
final jsonbody = json.encode(serializedBody);
|
||||
bodyData = jsonbody;
|
||||
|
||||
return _dio.request(
|
||||
return _dio.request(
|
||||
_path,
|
||||
queryParameters: queryParams,
|
||||
data: bodyData,
|
||||
options: Options(
|
||||
method: 'post'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json",
|
||||
method: 'post'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : 'application/json',
|
||||
),
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
}
|
||||
/// Delete user
|
||||
///
|
||||
/// This can only be done by the logged in user.
|
||||
Future<Response>deleteUser(String username,{ CancelToken cancelToken, Map<String, String> headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async {
|
||||
);
|
||||
}
|
||||
|
||||
String _path = "/user/{username}".replaceAll("{" r'username' "}", username.toString());
|
||||
/// Delete user
|
||||
///
|
||||
/// This can only be done by the logged in user.
|
||||
Future<Response>deleteUser(
|
||||
String username, {
|
||||
CancelToken cancelToken,
|
||||
Map<String, String> headers,
|
||||
ProgressCallback onSendProgress,
|
||||
ProgressCallback onReceiveProgress,
|
||||
}) async {
|
||||
final String _path = '/user/{username}'.replaceAll('{' r'username' '}', username.toString());
|
||||
|
||||
Map<String, dynamic> queryParams = {};
|
||||
Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
final Map<String, dynamic> queryParams = {};
|
||||
final Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
dynamic bodyData;
|
||||
|
||||
queryParams.removeWhere((key, value) => value == null);
|
||||
headerParams.removeWhere((key, value) => value == null);
|
||||
|
||||
List<String> contentTypes = [];
|
||||
final List<String> contentTypes = [];
|
||||
|
||||
|
||||
|
||||
return _dio.request(
|
||||
return _dio.request(
|
||||
_path,
|
||||
queryParameters: queryParams,
|
||||
data: bodyData,
|
||||
options: Options(
|
||||
method: 'delete'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json",
|
||||
method: 'delete'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : 'application/json',
|
||||
),
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
}
|
||||
/// Get user by user name
|
||||
///
|
||||
///
|
||||
Future<Response<User>>getUserByName(String username,{ CancelToken cancelToken, Map<String, String> headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async {
|
||||
);
|
||||
}
|
||||
|
||||
String _path = "/user/{username}".replaceAll("{" r'username' "}", username.toString());
|
||||
/// Get user by user name
|
||||
///
|
||||
///
|
||||
Future<Response<User>>getUserByName(
|
||||
String username, {
|
||||
CancelToken cancelToken,
|
||||
Map<String, String> headers,
|
||||
ProgressCallback onSendProgress,
|
||||
ProgressCallback onReceiveProgress,
|
||||
}) async {
|
||||
final String _path = '/user/{username}'.replaceAll('{' r'username' '}', username.toString());
|
||||
|
||||
Map<String, dynamic> queryParams = {};
|
||||
Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
final Map<String, dynamic> queryParams = {};
|
||||
final Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
dynamic bodyData;
|
||||
|
||||
queryParams.removeWhere((key, value) => value == null);
|
||||
headerParams.removeWhere((key, value) => value == null);
|
||||
|
||||
List<String> contentTypes = [];
|
||||
final List<String> contentTypes = [];
|
||||
|
||||
|
||||
|
||||
return _dio.request(
|
||||
return _dio.request(
|
||||
_path,
|
||||
queryParameters: queryParams,
|
||||
data: bodyData,
|
||||
options: Options(
|
||||
method: 'get'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json",
|
||||
method: 'get'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : 'application/json',
|
||||
),
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
).then((response) {
|
||||
|
||||
).then((response) {
|
||||
final serializer = _serializers.serializerForType(User);
|
||||
final data = _serializers.deserializeWith<User>(serializer, response.data is String ? jsonDecode(response.data) : response.data);
|
||||
|
||||
@ -211,45 +231,49 @@ class UserApi {
|
||||
statusMessage: response.statusMessage,
|
||||
extra: response.extra,
|
||||
);
|
||||
});
|
||||
}
|
||||
/// Logs user into the system
|
||||
///
|
||||
///
|
||||
Future<Response<String>>loginUser(String username,String password,{ CancelToken cancelToken, Map<String, String> headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async {
|
||||
});
|
||||
}
|
||||
|
||||
String _path = "/user/login";
|
||||
/// Logs user into the system
|
||||
///
|
||||
///
|
||||
Future<Response<String>>loginUser(
|
||||
String username,
|
||||
String password, {
|
||||
CancelToken cancelToken,
|
||||
Map<String, String> headers,
|
||||
ProgressCallback onSendProgress,
|
||||
ProgressCallback onReceiveProgress,
|
||||
}) async {
|
||||
final String _path = '/user/login';
|
||||
|
||||
Map<String, dynamic> queryParams = {};
|
||||
Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
final Map<String, dynamic> queryParams = {};
|
||||
final Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
dynamic bodyData;
|
||||
|
||||
queryParams[r'username'] = username;
|
||||
queryParams[r'password'] = password;
|
||||
queryParams[r'username'] = username;
|
||||
queryParams[r'password'] = password;
|
||||
queryParams.removeWhere((key, value) => value == null);
|
||||
headerParams.removeWhere((key, value) => value == null);
|
||||
|
||||
List<String> contentTypes = [];
|
||||
final List<String> contentTypes = [];
|
||||
|
||||
|
||||
|
||||
return _dio.request(
|
||||
return _dio.request(
|
||||
_path,
|
||||
queryParameters: queryParams,
|
||||
data: bodyData,
|
||||
options: Options(
|
||||
method: 'get'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json",
|
||||
method: 'get'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : 'application/json',
|
||||
),
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
).then((response) {
|
||||
|
||||
).then((response) {
|
||||
final data = response.data as String;
|
||||
|
||||
return Response<String>(
|
||||
@ -261,79 +285,89 @@ class UserApi {
|
||||
statusMessage: response.statusMessage,
|
||||
extra: response.extra,
|
||||
);
|
||||
});
|
||||
}
|
||||
/// Logs out current logged in user session
|
||||
///
|
||||
///
|
||||
Future<Response>logoutUser({ CancelToken cancelToken, Map<String, String> headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async {
|
||||
});
|
||||
}
|
||||
|
||||
String _path = "/user/logout";
|
||||
/// Logs out current logged in user session
|
||||
///
|
||||
///
|
||||
Future<Response>logoutUser({
|
||||
CancelToken cancelToken,
|
||||
Map<String, String> headers,
|
||||
ProgressCallback onSendProgress,
|
||||
ProgressCallback onReceiveProgress,
|
||||
}) async {
|
||||
final String _path = '/user/logout';
|
||||
|
||||
Map<String, dynamic> queryParams = {};
|
||||
Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
final Map<String, dynamic> queryParams = {};
|
||||
final Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
dynamic bodyData;
|
||||
|
||||
queryParams.removeWhere((key, value) => value == null);
|
||||
headerParams.removeWhere((key, value) => value == null);
|
||||
|
||||
List<String> contentTypes = [];
|
||||
final List<String> contentTypes = [];
|
||||
|
||||
|
||||
|
||||
return _dio.request(
|
||||
return _dio.request(
|
||||
_path,
|
||||
queryParameters: queryParams,
|
||||
data: bodyData,
|
||||
options: Options(
|
||||
method: 'get'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json",
|
||||
method: 'get'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : 'application/json',
|
||||
),
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
}
|
||||
/// Updated user
|
||||
///
|
||||
/// This can only be done by the logged in user.
|
||||
Future<Response>updateUser(String username,User body,{ CancelToken cancelToken, Map<String, String> headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async {
|
||||
);
|
||||
}
|
||||
|
||||
String _path = "/user/{username}".replaceAll("{" r'username' "}", username.toString());
|
||||
/// Updated user
|
||||
///
|
||||
/// This can only be done by the logged in user.
|
||||
Future<Response>updateUser(
|
||||
String username,
|
||||
User body, {
|
||||
CancelToken cancelToken,
|
||||
Map<String, String> headers,
|
||||
ProgressCallback onSendProgress,
|
||||
ProgressCallback onReceiveProgress,
|
||||
}) async {
|
||||
final String _path = '/user/{username}'.replaceAll('{' r'username' '}', username.toString());
|
||||
|
||||
Map<String, dynamic> queryParams = {};
|
||||
Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
final Map<String, dynamic> queryParams = {};
|
||||
final Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
dynamic bodyData;
|
||||
|
||||
queryParams.removeWhere((key, value) => value == null);
|
||||
headerParams.removeWhere((key, value) => value == null);
|
||||
|
||||
List<String> contentTypes = [];
|
||||
final List<String> contentTypes = [];
|
||||
|
||||
final serializedBody = _serializers.serialize(body);
|
||||
final jsonbody = json.encode(serializedBody);
|
||||
bodyData = jsonbody;
|
||||
|
||||
final serializedBody = _serializers.serialize(body);
|
||||
final jsonbody = json.encode(serializedBody);
|
||||
bodyData = jsonbody;
|
||||
|
||||
return _dio.request(
|
||||
return _dio.request(
|
||||
_path,
|
||||
queryParameters: queryParams,
|
||||
data: bodyData,
|
||||
options: Options(
|
||||
method: 'put'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json",
|
||||
method: 'put'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : 'application/json',
|
||||
),
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -5,15 +5,14 @@ part 'api_response.g.dart';
|
||||
|
||||
abstract class ApiResponse implements Built<ApiResponse, ApiResponseBuilder> {
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'code')
|
||||
int get code;
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'type')
|
||||
String get type;
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'message')
|
||||
String get message;
|
||||
|
@ -5,11 +5,10 @@ part 'category.g.dart';
|
||||
|
||||
abstract class Category implements Built<Category, CategoryBuilder> {
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'id')
|
||||
int get id;
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'name')
|
||||
String get name;
|
||||
|
@ -6,28 +6,28 @@ part 'order.g.dart';
|
||||
|
||||
abstract class Order implements Built<Order, OrderBuilder> {
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'id')
|
||||
int get id;
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'petId')
|
||||
int get petId;
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'quantity')
|
||||
int get quantity;
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'shipDate')
|
||||
DateTime get shipDate;
|
||||
/* Order Status */
|
||||
|
||||
/// Order Status
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'status')
|
||||
OrderStatusEnum get status;
|
||||
// enum statusEnum { placed, approved, delivered, };
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'complete')
|
||||
bool get complete;
|
||||
|
@ -8,27 +8,27 @@ part 'pet.g.dart';
|
||||
|
||||
abstract class Pet implements Built<Pet, PetBuilder> {
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'id')
|
||||
int get id;
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'category')
|
||||
Category get category;
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'name')
|
||||
String get name;
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'photoUrls')
|
||||
BuiltList<String> get photoUrls;
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'tags')
|
||||
BuiltList<Tag> get tags;
|
||||
/* pet status in the store */
|
||||
|
||||
/// pet status in the store
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'status')
|
||||
PetStatusEnum get status;
|
||||
|
@ -5,11 +5,10 @@ part 'tag.g.dart';
|
||||
|
||||
abstract class Tag implements Built<Tag, TagBuilder> {
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'id')
|
||||
int get id;
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'name')
|
||||
String get name;
|
||||
|
@ -5,35 +5,35 @@ part 'user.g.dart';
|
||||
|
||||
abstract class User implements Built<User, UserBuilder> {
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'id')
|
||||
int get id;
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'username')
|
||||
String get username;
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'firstName')
|
||||
String get firstName;
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'lastName')
|
||||
String get lastName;
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'email')
|
||||
String get email;
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'password')
|
||||
String get password;
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'phone')
|
||||
String get phone;
|
||||
/* User Status */
|
||||
|
||||
/// User Status
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'userStatus')
|
||||
int get userStatus;
|
||||
|
@ -17,13 +17,10 @@ class ApiResponse {
|
||||
this.message,
|
||||
});
|
||||
|
||||
|
||||
int code;
|
||||
|
||||
|
||||
String type;
|
||||
|
||||
|
||||
String message;
|
||||
|
||||
@override
|
||||
|
@ -16,10 +16,8 @@ class Category {
|
||||
this.name,
|
||||
});
|
||||
|
||||
|
||||
int id;
|
||||
|
||||
|
||||
String name;
|
||||
|
||||
@override
|
||||
|
@ -20,22 +20,17 @@ class Order {
|
||||
this.complete = false,
|
||||
});
|
||||
|
||||
|
||||
int id;
|
||||
|
||||
|
||||
int petId;
|
||||
|
||||
|
||||
int quantity;
|
||||
|
||||
|
||||
DateTime shipDate;
|
||||
|
||||
/// Order Status
|
||||
OrderStatusEnum status;
|
||||
|
||||
|
||||
bool complete;
|
||||
|
||||
@override
|
||||
|
@ -20,19 +20,14 @@ class Pet {
|
||||
this.status,
|
||||
});
|
||||
|
||||
|
||||
int id;
|
||||
|
||||
|
||||
Category category;
|
||||
|
||||
|
||||
String name;
|
||||
|
||||
|
||||
List<String> photoUrls;
|
||||
|
||||
|
||||
List<Tag> tags;
|
||||
|
||||
/// pet status in the store
|
||||
|
@ -16,10 +16,8 @@ class Tag {
|
||||
this.name,
|
||||
});
|
||||
|
||||
|
||||
int id;
|
||||
|
||||
|
||||
String name;
|
||||
|
||||
@override
|
||||
|
@ -22,25 +22,18 @@ class User {
|
||||
this.userStatus,
|
||||
});
|
||||
|
||||
|
||||
int id;
|
||||
|
||||
|
||||
String username;
|
||||
|
||||
|
||||
String firstName;
|
||||
|
||||
|
||||
String lastName;
|
||||
|
||||
|
||||
String email;
|
||||
|
||||
|
||||
String password;
|
||||
|
||||
|
||||
String phone;
|
||||
|
||||
/// User Status
|
||||
|
@ -11,8 +11,8 @@ Name | Type | Description | Notes
|
||||
**id** | **int** | | [optional] [default to null]
|
||||
**category** | [**Category**](Category.md) | | [optional] [default to null]
|
||||
**name** | **String** | | [default to null]
|
||||
**photoUrls** | **BuiltList<String>** | | [default to const []]
|
||||
**tags** | [**BuiltList<Tag>**](Tag.md) | | [optional] [default to const []]
|
||||
**photoUrls** | **BuiltList<String>** | | [default to const []]
|
||||
**tags** | [**BuiltList<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)
|
||||
|
@ -37,7 +37,7 @@ try {
|
||||
var result = api_instance.addPet(pet);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print("Exception when calling PetApi->addPet: $e\n");
|
||||
print('Exception when calling PetApi->addPet: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
@ -80,7 +80,7 @@ var apiKey = apiKey_example; // String |
|
||||
try {
|
||||
api_instance.deletePet(petId, apiKey);
|
||||
} catch (e) {
|
||||
print("Exception when calling PetApi->deletePet: $e\n");
|
||||
print('Exception when calling PetApi->deletePet: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
@ -126,7 +126,7 @@ try {
|
||||
var result = api_instance.findPetsByStatus(status);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print("Exception when calling PetApi->findPetsByStatus: $e\n");
|
||||
print('Exception when calling PetApi->findPetsByStatus: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
@ -134,7 +134,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**status** | [**BuiltList<String>**](String.md)| Status values that need to be considered for filter | [default to const []]
|
||||
**status** | [**BuiltList<String>**](String.md)| Status values that need to be considered for filter | [default to const []]
|
||||
|
||||
### Return type
|
||||
|
||||
@ -171,7 +171,7 @@ try {
|
||||
var result = api_instance.findPetsByTags(tags);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print("Exception when calling PetApi->findPetsByTags: $e\n");
|
||||
print('Exception when calling PetApi->findPetsByTags: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
@ -179,7 +179,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**tags** | [**BuiltList<String>**](String.md)| Tags to filter by | [default to const []]
|
||||
**tags** | [**BuiltList<String>**](String.md)| Tags to filter by | [default to const []]
|
||||
|
||||
### Return type
|
||||
|
||||
@ -218,7 +218,7 @@ try {
|
||||
var result = api_instance.getPetById(petId);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print("Exception when calling PetApi->getPetById: $e\n");
|
||||
print('Exception when calling PetApi->getPetById: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
@ -261,7 +261,7 @@ try {
|
||||
var result = api_instance.updatePet(pet);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print("Exception when calling PetApi->updatePet: $e\n");
|
||||
print('Exception when calling PetApi->updatePet: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
@ -305,7 +305,7 @@ 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");
|
||||
print('Exception when calling PetApi->updatePetWithForm: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
@ -352,7 +352,7 @@ try {
|
||||
var result = api_instance.uploadFile(petId, additionalMetadata, file);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print("Exception when calling PetApi->uploadFile: $e\n");
|
||||
print('Exception when calling PetApi->uploadFile: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -32,7 +32,7 @@ var orderId = orderId_example; // String | ID of the order that needs to be dele
|
||||
try {
|
||||
api_instance.deleteOrder(orderId);
|
||||
} catch (e) {
|
||||
print("Exception when calling StoreApi->deleteOrder: $e\n");
|
||||
print('Exception when calling StoreApi->deleteOrder: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
@ -78,7 +78,7 @@ try {
|
||||
var result = api_instance.getInventory();
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print("Exception when calling StoreApi->getInventory: $e\n");
|
||||
print('Exception when calling StoreApi->getInventory: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
@ -118,7 +118,7 @@ try {
|
||||
var result = api_instance.getOrderById(orderId);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print("Exception when calling StoreApi->getOrderById: $e\n");
|
||||
print('Exception when calling StoreApi->getOrderById: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
@ -159,7 +159,7 @@ try {
|
||||
var result = api_instance.placeOrder(order);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print("Exception when calling StoreApi->placeOrder: $e\n");
|
||||
print('Exception when calling StoreApi->placeOrder: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -40,7 +40,7 @@ var user = new User(); // User | Created user object
|
||||
try {
|
||||
api_instance.createUser(user);
|
||||
} catch (e) {
|
||||
print("Exception when calling UserApi->createUser: $e\n");
|
||||
print('Exception when calling UserApi->createUser: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
@ -79,12 +79,12 @@ import 'package:openapi/api.dart';
|
||||
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
|
||||
|
||||
var api_instance = new UserApi();
|
||||
var user = [new BuiltList<User>()]; // BuiltList<User> | List of user object
|
||||
var user = [new BuiltList<User>()]; // BuiltList<User> | List of user object
|
||||
|
||||
try {
|
||||
api_instance.createUsersWithArrayInput(user);
|
||||
} catch (e) {
|
||||
print("Exception when calling UserApi->createUsersWithArrayInput: $e\n");
|
||||
print('Exception when calling UserApi->createUsersWithArrayInput: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
@ -92,7 +92,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**user** | [**BuiltList<User>**](User.md)| List of user object |
|
||||
**user** | [**BuiltList<User>**](User.md)| List of user object |
|
||||
|
||||
### Return type
|
||||
|
||||
@ -123,12 +123,12 @@ import 'package:openapi/api.dart';
|
||||
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
|
||||
|
||||
var api_instance = new UserApi();
|
||||
var user = [new BuiltList<User>()]; // BuiltList<User> | List of user object
|
||||
var user = [new BuiltList<User>()]; // BuiltList<User> | List of user object
|
||||
|
||||
try {
|
||||
api_instance.createUsersWithListInput(user);
|
||||
} catch (e) {
|
||||
print("Exception when calling UserApi->createUsersWithListInput: $e\n");
|
||||
print('Exception when calling UserApi->createUsersWithListInput: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
@ -136,7 +136,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**user** | [**BuiltList<User>**](User.md)| List of user object |
|
||||
**user** | [**BuiltList<User>**](User.md)| List of user object |
|
||||
|
||||
### Return type
|
||||
|
||||
@ -174,7 +174,7 @@ 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");
|
||||
print('Exception when calling UserApi->deleteUser: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
@ -215,7 +215,7 @@ try {
|
||||
var result = api_instance.getUserByName(username);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print("Exception when calling UserApi->getUserByName: $e\n");
|
||||
print('Exception when calling UserApi->getUserByName: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
@ -257,7 +257,7 @@ try {
|
||||
var result = api_instance.loginUser(username, password);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print("Exception when calling UserApi->loginUser: $e\n");
|
||||
print('Exception when calling UserApi->loginUser: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
@ -301,7 +301,7 @@ var api_instance = new UserApi();
|
||||
try {
|
||||
api_instance.logoutUser();
|
||||
} catch (e) {
|
||||
print("Exception when calling UserApi->logoutUser: $e\n");
|
||||
print('Exception when calling UserApi->logoutUser: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
@ -345,7 +345,7 @@ var user = new User(); // User | Updated user object
|
||||
try {
|
||||
api_instance.updateUser(username, user);
|
||||
} catch (e) {
|
||||
print("Exception when calling UserApi->updateUser: $e\n");
|
||||
print('Exception when calling UserApi->updateUser: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -17,7 +17,7 @@ class Openapi {
|
||||
|
||||
Dio dio;
|
||||
Serializers serializers;
|
||||
String basePath = "http://petstore.swagger.io/v2";
|
||||
String basePath = 'http://petstore.swagger.io/v2';
|
||||
|
||||
Openapi({this.dio, Serializers serializers, String basePathOverride, List<Interceptor> interceptors}) {
|
||||
if (dio == null) {
|
||||
|
@ -1,5 +1,4 @@
|
||||
import 'dart:async';
|
||||
import 'dart:io';
|
||||
import 'dart:convert';
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
@ -16,44 +15,55 @@ class PetApi {
|
||||
|
||||
PetApi(this._dio, this._serializers);
|
||||
|
||||
/// Add a new pet to the store
|
||||
///
|
||||
///
|
||||
Future<Response<Pet>>addPet(Pet pet,{ CancelToken cancelToken, Map<String, String> headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async {
|
||||
/// Add a new pet to the store
|
||||
///
|
||||
///
|
||||
Future<Response<Pet>>addPet(
|
||||
Pet pet, {
|
||||
CancelToken cancelToken,
|
||||
Map<String, String> headers,
|
||||
ProgressCallback onSendProgress,
|
||||
ProgressCallback onReceiveProgress,
|
||||
}) async {
|
||||
final String _path = '/pet';
|
||||
|
||||
String _path = "/pet";
|
||||
|
||||
Map<String, dynamic> queryParams = {};
|
||||
Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
final Map<String, dynamic> queryParams = {};
|
||||
final Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
dynamic bodyData;
|
||||
|
||||
queryParams.removeWhere((key, value) => value == null);
|
||||
headerParams.removeWhere((key, value) => value == null);
|
||||
|
||||
List<String> contentTypes = ["application/json","application/xml"];
|
||||
final List<String> contentTypes = [
|
||||
'application/json',
|
||||
'application/xml',
|
||||
];
|
||||
|
||||
final serializedBody = _serializers.serialize(pet);
|
||||
final jsonpet = json.encode(serializedBody);
|
||||
bodyData = jsonpet;
|
||||
|
||||
final serializedBody = _serializers.serialize(pet);
|
||||
final jsonpet = json.encode(serializedBody);
|
||||
bodyData = jsonpet;
|
||||
|
||||
return _dio.request(
|
||||
return _dio.request(
|
||||
_path,
|
||||
queryParameters: queryParams,
|
||||
data: bodyData,
|
||||
options: Options(
|
||||
method: 'post'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [ {"type": "oauth2", "name": "petstore_auth" }],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json",
|
||||
method: 'post'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [
|
||||
{
|
||||
'type': 'oauth2',
|
||||
'name': 'petstore_auth',
|
||||
},
|
||||
],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : 'application/json',
|
||||
),
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
).then((response) {
|
||||
|
||||
).then((response) {
|
||||
final serializer = _serializers.serializerForType(Pet);
|
||||
final data = _serializers.deserializeWith<Pet>(serializer, response.data is String ? jsonDecode(response.data) : response.data);
|
||||
|
||||
@ -66,80 +76,98 @@ class PetApi {
|
||||
statusMessage: response.statusMessage,
|
||||
extra: response.extra,
|
||||
);
|
||||
});
|
||||
}
|
||||
/// Deletes a pet
|
||||
///
|
||||
///
|
||||
Future<Response>deletePet(int petId,{ String apiKey,CancelToken cancelToken, Map<String, String> headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async {
|
||||
});
|
||||
}
|
||||
|
||||
String _path = "/pet/{petId}".replaceAll("{" r'petId' "}", petId.toString());
|
||||
/// Deletes a pet
|
||||
///
|
||||
///
|
||||
Future<Response>deletePet(
|
||||
int petId, {
|
||||
String apiKey,
|
||||
CancelToken cancelToken,
|
||||
Map<String, String> headers,
|
||||
ProgressCallback onSendProgress,
|
||||
ProgressCallback onReceiveProgress,
|
||||
}) async {
|
||||
final String _path = '/pet/{petId}'.replaceAll('{' r'petId' '}', petId.toString());
|
||||
|
||||
Map<String, dynamic> queryParams = {};
|
||||
Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
final Map<String, dynamic> queryParams = {};
|
||||
final Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
dynamic bodyData;
|
||||
|
||||
headerParams[r'api_key'] = apiKey;
|
||||
headerParams[r'api_key'] = apiKey;
|
||||
queryParams.removeWhere((key, value) => value == null);
|
||||
headerParams.removeWhere((key, value) => value == null);
|
||||
|
||||
List<String> contentTypes = [];
|
||||
final List<String> contentTypes = [];
|
||||
|
||||
|
||||
|
||||
return _dio.request(
|
||||
return _dio.request(
|
||||
_path,
|
||||
queryParameters: queryParams,
|
||||
data: bodyData,
|
||||
options: Options(
|
||||
method: 'delete'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [ {"type": "oauth2", "name": "petstore_auth" }],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json",
|
||||
method: 'delete'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [
|
||||
{
|
||||
'type': 'oauth2',
|
||||
'name': 'petstore_auth',
|
||||
},
|
||||
],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : 'application/json',
|
||||
),
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
}
|
||||
/// Finds Pets by status
|
||||
///
|
||||
/// Multiple status values can be provided with comma separated strings
|
||||
Future<Response<BuiltList<Pet>>>findPetsByStatus(BuiltList<String> status,{ CancelToken cancelToken, Map<String, String> headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async {
|
||||
);
|
||||
}
|
||||
|
||||
String _path = "/pet/findByStatus";
|
||||
/// Finds Pets by status
|
||||
///
|
||||
/// Multiple status values can be provided with comma separated strings
|
||||
Future<Response<BuiltList<Pet>>>findPetsByStatus(
|
||||
BuiltList<String> status, {
|
||||
CancelToken cancelToken,
|
||||
Map<String, String> headers,
|
||||
ProgressCallback onSendProgress,
|
||||
ProgressCallback onReceiveProgress,
|
||||
}) async {
|
||||
final String _path = '/pet/findByStatus';
|
||||
|
||||
Map<String, dynamic> queryParams = {};
|
||||
Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
final Map<String, dynamic> queryParams = {};
|
||||
final Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
dynamic bodyData;
|
||||
|
||||
queryParams[r'status'] = status;
|
||||
queryParams[r'status'] = status;
|
||||
queryParams.removeWhere((key, value) => value == null);
|
||||
headerParams.removeWhere((key, value) => value == null);
|
||||
|
||||
List<String> contentTypes = [];
|
||||
final List<String> contentTypes = [];
|
||||
|
||||
|
||||
|
||||
return _dio.request(
|
||||
return _dio.request(
|
||||
_path,
|
||||
queryParameters: queryParams,
|
||||
data: bodyData,
|
||||
options: Options(
|
||||
method: 'get'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [ {"type": "oauth2", "name": "petstore_auth" }],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json",
|
||||
method: 'get'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [
|
||||
{
|
||||
'type': 'oauth2',
|
||||
'name': 'petstore_auth',
|
||||
},
|
||||
],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : 'application/json',
|
||||
),
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
).then((response) {
|
||||
|
||||
).then((response) {
|
||||
const collectionType = BuiltList;
|
||||
const type = FullType(collectionType, [FullType(Pet)]);
|
||||
final BuiltList<Pet> data = _serializers.deserialize(response.data is String ? jsonDecode(response.data) : response.data, specifiedType: type);
|
||||
@ -153,44 +181,52 @@ class PetApi {
|
||||
statusMessage: response.statusMessage,
|
||||
extra: response.extra,
|
||||
);
|
||||
});
|
||||
}
|
||||
/// Finds Pets by tags
|
||||
///
|
||||
/// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
Future<Response<BuiltList<Pet>>>findPetsByTags(BuiltList<String> tags,{ CancelToken cancelToken, Map<String, String> headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async {
|
||||
});
|
||||
}
|
||||
|
||||
String _path = "/pet/findByTags";
|
||||
/// Finds Pets by tags
|
||||
///
|
||||
/// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
Future<Response<BuiltList<Pet>>>findPetsByTags(
|
||||
BuiltList<String> tags, {
|
||||
CancelToken cancelToken,
|
||||
Map<String, String> headers,
|
||||
ProgressCallback onSendProgress,
|
||||
ProgressCallback onReceiveProgress,
|
||||
}) async {
|
||||
final String _path = '/pet/findByTags';
|
||||
|
||||
Map<String, dynamic> queryParams = {};
|
||||
Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
final Map<String, dynamic> queryParams = {};
|
||||
final Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
dynamic bodyData;
|
||||
|
||||
queryParams[r'tags'] = tags;
|
||||
queryParams[r'tags'] = tags;
|
||||
queryParams.removeWhere((key, value) => value == null);
|
||||
headerParams.removeWhere((key, value) => value == null);
|
||||
|
||||
List<String> contentTypes = [];
|
||||
final List<String> contentTypes = [];
|
||||
|
||||
|
||||
|
||||
return _dio.request(
|
||||
return _dio.request(
|
||||
_path,
|
||||
queryParameters: queryParams,
|
||||
data: bodyData,
|
||||
options: Options(
|
||||
method: 'get'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [ {"type": "oauth2", "name": "petstore_auth" }],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json",
|
||||
method: 'get'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [
|
||||
{
|
||||
'type': 'oauth2',
|
||||
'name': 'petstore_auth',
|
||||
},
|
||||
],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : 'application/json',
|
||||
),
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
).then((response) {
|
||||
|
||||
).then((response) {
|
||||
const collectionType = BuiltList;
|
||||
const type = FullType(collectionType, [FullType(Pet)]);
|
||||
final BuiltList<Pet> data = _serializers.deserialize(response.data is String ? jsonDecode(response.data) : response.data, specifiedType: type);
|
||||
@ -204,43 +240,53 @@ class PetApi {
|
||||
statusMessage: response.statusMessage,
|
||||
extra: response.extra,
|
||||
);
|
||||
});
|
||||
}
|
||||
/// Find pet by ID
|
||||
///
|
||||
/// Returns a single pet
|
||||
Future<Response<Pet>>getPetById(int petId,{ CancelToken cancelToken, Map<String, String> headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async {
|
||||
});
|
||||
}
|
||||
|
||||
String _path = "/pet/{petId}".replaceAll("{" r'petId' "}", petId.toString());
|
||||
/// Find pet by ID
|
||||
///
|
||||
/// Returns a single pet
|
||||
Future<Response<Pet>>getPetById(
|
||||
int petId, {
|
||||
CancelToken cancelToken,
|
||||
Map<String, String> headers,
|
||||
ProgressCallback onSendProgress,
|
||||
ProgressCallback onReceiveProgress,
|
||||
}) async {
|
||||
final String _path = '/pet/{petId}'.replaceAll('{' r'petId' '}', petId.toString());
|
||||
|
||||
Map<String, dynamic> queryParams = {};
|
||||
Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
final Map<String, dynamic> queryParams = {};
|
||||
final Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
dynamic bodyData;
|
||||
|
||||
queryParams.removeWhere((key, value) => value == null);
|
||||
headerParams.removeWhere((key, value) => value == null);
|
||||
|
||||
List<String> contentTypes = [];
|
||||
final List<String> contentTypes = [];
|
||||
|
||||
|
||||
|
||||
return _dio.request(
|
||||
return _dio.request(
|
||||
_path,
|
||||
queryParameters: queryParams,
|
||||
data: bodyData,
|
||||
options: Options(
|
||||
method: 'get'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [ {"type": "apiKey", "name": "api_key", "keyName": "api_key", "where": "header" }],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json",
|
||||
method: 'get'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'api_key',
|
||||
'where': 'header',
|
||||
},
|
||||
],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : 'application/json',
|
||||
),
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
).then((response) {
|
||||
|
||||
).then((response) {
|
||||
final serializer = _serializers.serializerForType(Pet);
|
||||
final data = _serializers.deserializeWith<Pet>(serializer, response.data is String ? jsonDecode(response.data) : response.data);
|
||||
|
||||
@ -253,46 +299,58 @@ class PetApi {
|
||||
statusMessage: response.statusMessage,
|
||||
extra: response.extra,
|
||||
);
|
||||
});
|
||||
}
|
||||
/// Update an existing pet
|
||||
///
|
||||
///
|
||||
Future<Response<Pet>>updatePet(Pet pet,{ CancelToken cancelToken, Map<String, String> headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async {
|
||||
});
|
||||
}
|
||||
|
||||
String _path = "/pet";
|
||||
/// Update an existing pet
|
||||
///
|
||||
///
|
||||
Future<Response<Pet>>updatePet(
|
||||
Pet pet, {
|
||||
CancelToken cancelToken,
|
||||
Map<String, String> headers,
|
||||
ProgressCallback onSendProgress,
|
||||
ProgressCallback onReceiveProgress,
|
||||
}) async {
|
||||
final String _path = '/pet';
|
||||
|
||||
Map<String, dynamic> queryParams = {};
|
||||
Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
final Map<String, dynamic> queryParams = {};
|
||||
final Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
dynamic bodyData;
|
||||
|
||||
queryParams.removeWhere((key, value) => value == null);
|
||||
headerParams.removeWhere((key, value) => value == null);
|
||||
|
||||
List<String> contentTypes = ["application/json","application/xml"];
|
||||
final List<String> contentTypes = [
|
||||
'application/json',
|
||||
'application/xml',
|
||||
];
|
||||
|
||||
final serializedBody = _serializers.serialize(pet);
|
||||
final jsonpet = json.encode(serializedBody);
|
||||
bodyData = jsonpet;
|
||||
|
||||
final serializedBody = _serializers.serialize(pet);
|
||||
final jsonpet = json.encode(serializedBody);
|
||||
bodyData = jsonpet;
|
||||
|
||||
return _dio.request(
|
||||
return _dio.request(
|
||||
_path,
|
||||
queryParameters: queryParams,
|
||||
data: bodyData,
|
||||
options: Options(
|
||||
method: 'put'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [ {"type": "oauth2", "name": "petstore_auth" }],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json",
|
||||
method: 'put'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [
|
||||
{
|
||||
'type': 'oauth2',
|
||||
'name': 'petstore_auth',
|
||||
},
|
||||
],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : 'application/json',
|
||||
),
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
).then((response) {
|
||||
|
||||
).then((response) {
|
||||
final serializer = _serializers.serializerForType(Pet);
|
||||
final data = _serializers.deserializeWith<Pet>(serializer, response.data is String ? jsonDecode(response.data) : response.data);
|
||||
|
||||
@ -305,62 +363,86 @@ class PetApi {
|
||||
statusMessage: response.statusMessage,
|
||||
extra: response.extra,
|
||||
);
|
||||
});
|
||||
}
|
||||
/// Updates a pet in the store with form data
|
||||
///
|
||||
///
|
||||
Future<Response>updatePetWithForm(int petId,{ String name,String status,CancelToken cancelToken, Map<String, String> headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async {
|
||||
});
|
||||
}
|
||||
|
||||
String _path = "/pet/{petId}".replaceAll("{" r'petId' "}", petId.toString());
|
||||
/// Updates a pet in the store with form data
|
||||
///
|
||||
///
|
||||
Future<Response>updatePetWithForm(
|
||||
int petId, {
|
||||
String name,
|
||||
String status,
|
||||
CancelToken cancelToken,
|
||||
Map<String, String> headers,
|
||||
ProgressCallback onSendProgress,
|
||||
ProgressCallback onReceiveProgress,
|
||||
}) async {
|
||||
final String _path = '/pet/{petId}'.replaceAll('{' r'petId' '}', petId.toString());
|
||||
|
||||
Map<String, dynamic> queryParams = {};
|
||||
Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
final Map<String, dynamic> queryParams = {};
|
||||
final Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
dynamic bodyData;
|
||||
|
||||
queryParams.removeWhere((key, value) => value == null);
|
||||
headerParams.removeWhere((key, value) => value == null);
|
||||
|
||||
List<String> contentTypes = ["application/x-www-form-urlencoded"];
|
||||
final List<String> contentTypes = [
|
||||
'application/x-www-form-urlencoded',
|
||||
];
|
||||
|
||||
final Map<String, dynamic> formData = {};
|
||||
formData['name'] = parameterToString(_serializers, name);
|
||||
formData['status'] = parameterToString(_serializers, status);
|
||||
bodyData = formData;
|
||||
|
||||
|
||||
return _dio.request(
|
||||
return _dio.request(
|
||||
_path,
|
||||
queryParameters: queryParams,
|
||||
data: bodyData,
|
||||
options: Options(
|
||||
method: 'post'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [ {"type": "oauth2", "name": "petstore_auth" }],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json",
|
||||
method: 'post'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [
|
||||
{
|
||||
'type': 'oauth2',
|
||||
'name': 'petstore_auth',
|
||||
},
|
||||
],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : 'application/json',
|
||||
),
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
}
|
||||
/// uploads an image
|
||||
///
|
||||
///
|
||||
Future<Response<ApiResponse>>uploadFile(int petId,{ String additionalMetadata,Uint8List file,CancelToken cancelToken, Map<String, String> headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async {
|
||||
);
|
||||
}
|
||||
|
||||
String _path = "/pet/{petId}/uploadImage".replaceAll("{" r'petId' "}", petId.toString());
|
||||
/// uploads an image
|
||||
///
|
||||
///
|
||||
Future<Response<ApiResponse>>uploadFile(
|
||||
int petId, {
|
||||
String additionalMetadata,
|
||||
Uint8List file,
|
||||
CancelToken cancelToken,
|
||||
Map<String, String> headers,
|
||||
ProgressCallback onSendProgress,
|
||||
ProgressCallback onReceiveProgress,
|
||||
}) async {
|
||||
final String _path = '/pet/{petId}/uploadImage'.replaceAll('{' r'petId' '}', petId.toString());
|
||||
|
||||
Map<String, dynamic> queryParams = {};
|
||||
Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
final Map<String, dynamic> queryParams = {};
|
||||
final Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
dynamic bodyData;
|
||||
|
||||
queryParams.removeWhere((key, value) => value == null);
|
||||
headerParams.removeWhere((key, value) => value == null);
|
||||
|
||||
List<String> contentTypes = ["multipart/form-data"];
|
||||
final List<String> contentTypes = [
|
||||
'multipart/form-data',
|
||||
];
|
||||
|
||||
final Map<String, dynamic> formData = {};
|
||||
if (additionalMetadata != null) {
|
||||
@ -371,24 +453,27 @@ class PetApi {
|
||||
}
|
||||
bodyData = FormData.fromMap(formData);
|
||||
|
||||
|
||||
return _dio.request(
|
||||
return _dio.request(
|
||||
_path,
|
||||
queryParameters: queryParams,
|
||||
data: bodyData,
|
||||
options: Options(
|
||||
method: 'post'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [ {"type": "oauth2", "name": "petstore_auth" }],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json",
|
||||
method: 'post'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [
|
||||
{
|
||||
'type': 'oauth2',
|
||||
'name': 'petstore_auth',
|
||||
},
|
||||
],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : 'application/json',
|
||||
),
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
).then((response) {
|
||||
|
||||
).then((response) {
|
||||
final serializer = _serializers.serializerForType(ApiResponse);
|
||||
final data = _serializers.deserializeWith<ApiResponse>(serializer, response.data is String ? jsonDecode(response.data) : response.data);
|
||||
|
||||
@ -401,6 +486,7 @@ class PetApi {
|
||||
statusMessage: response.statusMessage,
|
||||
extra: response.extra,
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,5 +1,4 @@
|
||||
import 'dart:async';
|
||||
import 'dart:io';
|
||||
import 'dart:convert';
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
@ -13,76 +12,88 @@ class StoreApi {
|
||||
|
||||
StoreApi(this._dio, this._serializers);
|
||||
|
||||
/// Delete purchase order by ID
|
||||
///
|
||||
/// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
Future<Response>deleteOrder(String orderId,{ CancelToken cancelToken, Map<String, String> headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async {
|
||||
/// Delete purchase order by ID
|
||||
///
|
||||
/// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
Future<Response>deleteOrder(
|
||||
String orderId, {
|
||||
CancelToken cancelToken,
|
||||
Map<String, String> headers,
|
||||
ProgressCallback onSendProgress,
|
||||
ProgressCallback onReceiveProgress,
|
||||
}) async {
|
||||
final String _path = '/store/order/{orderId}'.replaceAll('{' r'orderId' '}', orderId.toString());
|
||||
|
||||
String _path = "/store/order/{orderId}".replaceAll("{" r'orderId' "}", orderId.toString());
|
||||
|
||||
Map<String, dynamic> queryParams = {};
|
||||
Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
final Map<String, dynamic> queryParams = {};
|
||||
final Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
dynamic bodyData;
|
||||
|
||||
queryParams.removeWhere((key, value) => value == null);
|
||||
headerParams.removeWhere((key, value) => value == null);
|
||||
|
||||
List<String> contentTypes = [];
|
||||
final List<String> contentTypes = [];
|
||||
|
||||
|
||||
|
||||
return _dio.request(
|
||||
return _dio.request(
|
||||
_path,
|
||||
queryParameters: queryParams,
|
||||
data: bodyData,
|
||||
options: Options(
|
||||
method: 'delete'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json",
|
||||
method: 'delete'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : 'application/json',
|
||||
),
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
}
|
||||
/// Returns pet inventories by status
|
||||
///
|
||||
/// Returns a map of status codes to quantities
|
||||
Future<Response<BuiltMap<String, int>>>getInventory({ CancelToken cancelToken, Map<String, String> headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async {
|
||||
);
|
||||
}
|
||||
|
||||
String _path = "/store/inventory";
|
||||
/// Returns pet inventories by status
|
||||
///
|
||||
/// Returns a map of status codes to quantities
|
||||
Future<Response<BuiltMap<String, int>>>getInventory({
|
||||
CancelToken cancelToken,
|
||||
Map<String, String> headers,
|
||||
ProgressCallback onSendProgress,
|
||||
ProgressCallback onReceiveProgress,
|
||||
}) async {
|
||||
final String _path = '/store/inventory';
|
||||
|
||||
Map<String, dynamic> queryParams = {};
|
||||
Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
final Map<String, dynamic> queryParams = {};
|
||||
final Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
dynamic bodyData;
|
||||
|
||||
queryParams.removeWhere((key, value) => value == null);
|
||||
headerParams.removeWhere((key, value) => value == null);
|
||||
|
||||
List<String> contentTypes = [];
|
||||
final List<String> contentTypes = [];
|
||||
|
||||
|
||||
|
||||
return _dio.request(
|
||||
return _dio.request(
|
||||
_path,
|
||||
queryParameters: queryParams,
|
||||
data: bodyData,
|
||||
options: Options(
|
||||
method: 'get'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [ {"type": "apiKey", "name": "api_key", "keyName": "api_key", "where": "header" }],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json",
|
||||
method: 'get'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'api_key',
|
||||
'where': 'header',
|
||||
},
|
||||
],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : 'application/json',
|
||||
),
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
).then((response) {
|
||||
|
||||
).then((response) {
|
||||
const collectionType = BuiltMap;
|
||||
const type = FullType(collectionType, [FullType(String), FullType(int)]);
|
||||
final BuiltMap<String, int> data = _serializers.deserialize(response.data is String ? jsonDecode(response.data) : response.data, specifiedType: type);
|
||||
@ -96,43 +107,46 @@ class StoreApi {
|
||||
statusMessage: response.statusMessage,
|
||||
extra: response.extra,
|
||||
);
|
||||
});
|
||||
}
|
||||
/// Find purchase order by ID
|
||||
///
|
||||
/// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
Future<Response<Order>>getOrderById(int orderId,{ CancelToken cancelToken, Map<String, String> headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async {
|
||||
});
|
||||
}
|
||||
|
||||
String _path = "/store/order/{orderId}".replaceAll("{" r'orderId' "}", orderId.toString());
|
||||
/// Find purchase order by ID
|
||||
///
|
||||
/// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
Future<Response<Order>>getOrderById(
|
||||
int orderId, {
|
||||
CancelToken cancelToken,
|
||||
Map<String, String> headers,
|
||||
ProgressCallback onSendProgress,
|
||||
ProgressCallback onReceiveProgress,
|
||||
}) async {
|
||||
final String _path = '/store/order/{orderId}'.replaceAll('{' r'orderId' '}', orderId.toString());
|
||||
|
||||
Map<String, dynamic> queryParams = {};
|
||||
Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
final Map<String, dynamic> queryParams = {};
|
||||
final Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
dynamic bodyData;
|
||||
|
||||
queryParams.removeWhere((key, value) => value == null);
|
||||
headerParams.removeWhere((key, value) => value == null);
|
||||
|
||||
List<String> contentTypes = [];
|
||||
final List<String> contentTypes = [];
|
||||
|
||||
|
||||
|
||||
return _dio.request(
|
||||
return _dio.request(
|
||||
_path,
|
||||
queryParameters: queryParams,
|
||||
data: bodyData,
|
||||
options: Options(
|
||||
method: 'get'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json",
|
||||
method: 'get'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : 'application/json',
|
||||
),
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
).then((response) {
|
||||
|
||||
).then((response) {
|
||||
final serializer = _serializers.serializerForType(Order);
|
||||
final data = _serializers.deserializeWith<Order>(serializer, response.data is String ? jsonDecode(response.data) : response.data);
|
||||
|
||||
@ -145,46 +159,52 @@ class StoreApi {
|
||||
statusMessage: response.statusMessage,
|
||||
extra: response.extra,
|
||||
);
|
||||
});
|
||||
}
|
||||
/// Place an order for a pet
|
||||
///
|
||||
///
|
||||
Future<Response<Order>>placeOrder(Order order,{ CancelToken cancelToken, Map<String, String> headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async {
|
||||
});
|
||||
}
|
||||
|
||||
String _path = "/store/order";
|
||||
/// Place an order for a pet
|
||||
///
|
||||
///
|
||||
Future<Response<Order>>placeOrder(
|
||||
Order order, {
|
||||
CancelToken cancelToken,
|
||||
Map<String, String> headers,
|
||||
ProgressCallback onSendProgress,
|
||||
ProgressCallback onReceiveProgress,
|
||||
}) async {
|
||||
final String _path = '/store/order';
|
||||
|
||||
Map<String, dynamic> queryParams = {};
|
||||
Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
final Map<String, dynamic> queryParams = {};
|
||||
final Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
dynamic bodyData;
|
||||
|
||||
queryParams.removeWhere((key, value) => value == null);
|
||||
headerParams.removeWhere((key, value) => value == null);
|
||||
|
||||
List<String> contentTypes = ["application/json"];
|
||||
final List<String> contentTypes = [
|
||||
'application/json',
|
||||
];
|
||||
|
||||
final serializedBody = _serializers.serialize(order);
|
||||
final jsonorder = json.encode(serializedBody);
|
||||
bodyData = jsonorder;
|
||||
|
||||
final serializedBody = _serializers.serialize(order);
|
||||
final jsonorder = json.encode(serializedBody);
|
||||
bodyData = jsonorder;
|
||||
|
||||
return _dio.request(
|
||||
return _dio.request(
|
||||
_path,
|
||||
queryParameters: queryParams,
|
||||
data: bodyData,
|
||||
options: Options(
|
||||
method: 'post'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json",
|
||||
method: 'post'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : 'application/json',
|
||||
),
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
).then((response) {
|
||||
|
||||
).then((response) {
|
||||
final serializer = _serializers.serializerForType(Order);
|
||||
final data = _serializers.deserializeWith<Order>(serializer, response.data is String ? jsonDecode(response.data) : response.data);
|
||||
|
||||
@ -197,6 +217,7 @@ class StoreApi {
|
||||
statusMessage: response.statusMessage,
|
||||
extra: response.extra,
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,5 +1,4 @@
|
||||
import 'dart:async';
|
||||
import 'dart:io';
|
||||
import 'dart:convert';
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
@ -13,192 +12,247 @@ class UserApi {
|
||||
|
||||
UserApi(this._dio, this._serializers);
|
||||
|
||||
/// Create user
|
||||
///
|
||||
/// This can only be done by the logged in user.
|
||||
Future<Response>createUser(User user,{ CancelToken cancelToken, Map<String, String> headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async {
|
||||
/// Create user
|
||||
///
|
||||
/// This can only be done by the logged in user.
|
||||
Future<Response>createUser(
|
||||
User user, {
|
||||
CancelToken cancelToken,
|
||||
Map<String, String> headers,
|
||||
ProgressCallback onSendProgress,
|
||||
ProgressCallback onReceiveProgress,
|
||||
}) async {
|
||||
final String _path = '/user';
|
||||
|
||||
String _path = "/user";
|
||||
|
||||
Map<String, dynamic> queryParams = {};
|
||||
Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
final Map<String, dynamic> queryParams = {};
|
||||
final Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
dynamic bodyData;
|
||||
|
||||
queryParams.removeWhere((key, value) => value == null);
|
||||
headerParams.removeWhere((key, value) => value == null);
|
||||
|
||||
List<String> contentTypes = ["application/json"];
|
||||
final List<String> contentTypes = [
|
||||
'application/json',
|
||||
];
|
||||
|
||||
final serializedBody = _serializers.serialize(user);
|
||||
final jsonuser = json.encode(serializedBody);
|
||||
bodyData = jsonuser;
|
||||
|
||||
final serializedBody = _serializers.serialize(user);
|
||||
final jsonuser = json.encode(serializedBody);
|
||||
bodyData = jsonuser;
|
||||
|
||||
return _dio.request(
|
||||
return _dio.request(
|
||||
_path,
|
||||
queryParameters: queryParams,
|
||||
data: bodyData,
|
||||
options: Options(
|
||||
method: 'post'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [ {"type": "apiKey", "name": "api_key", "keyName": "api_key", "where": "header" }],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json",
|
||||
method: 'post'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'api_key',
|
||||
'where': 'header',
|
||||
},
|
||||
],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : 'application/json',
|
||||
),
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
}
|
||||
/// Creates list of users with given input array
|
||||
///
|
||||
///
|
||||
Future<Response>createUsersWithArrayInput(BuiltList<User> user,{ CancelToken cancelToken, Map<String, String> headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async {
|
||||
);
|
||||
}
|
||||
|
||||
String _path = "/user/createWithArray";
|
||||
/// Creates list of users with given input array
|
||||
///
|
||||
///
|
||||
Future<Response>createUsersWithArrayInput(
|
||||
BuiltList<User> user, {
|
||||
CancelToken cancelToken,
|
||||
Map<String, String> headers,
|
||||
ProgressCallback onSendProgress,
|
||||
ProgressCallback onReceiveProgress,
|
||||
}) async {
|
||||
final String _path = '/user/createWithArray';
|
||||
|
||||
Map<String, dynamic> queryParams = {};
|
||||
Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
final Map<String, dynamic> queryParams = {};
|
||||
final Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
dynamic bodyData;
|
||||
|
||||
queryParams.removeWhere((key, value) => value == null);
|
||||
headerParams.removeWhere((key, value) => value == null);
|
||||
|
||||
List<String> contentTypes = ["application/json"];
|
||||
final List<String> contentTypes = [
|
||||
'application/json',
|
||||
];
|
||||
|
||||
const type = FullType(BuiltList, [FullType(User)]);
|
||||
final serializedBody = _serializers.serialize(user, specifiedType: type);
|
||||
final jsonuser = json.encode(serializedBody);
|
||||
bodyData = jsonuser;
|
||||
|
||||
const type = FullType(BuiltList, [FullType(User)]);
|
||||
final serializedBody = _serializers.serialize(user, specifiedType: type);
|
||||
final jsonuser = json.encode(serializedBody);
|
||||
bodyData = jsonuser;
|
||||
|
||||
return _dio.request(
|
||||
return _dio.request(
|
||||
_path,
|
||||
queryParameters: queryParams,
|
||||
data: bodyData,
|
||||
options: Options(
|
||||
method: 'post'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [ {"type": "apiKey", "name": "api_key", "keyName": "api_key", "where": "header" }],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json",
|
||||
method: 'post'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'api_key',
|
||||
'where': 'header',
|
||||
},
|
||||
],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : 'application/json',
|
||||
),
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
}
|
||||
/// Creates list of users with given input array
|
||||
///
|
||||
///
|
||||
Future<Response>createUsersWithListInput(BuiltList<User> user,{ CancelToken cancelToken, Map<String, String> headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async {
|
||||
);
|
||||
}
|
||||
|
||||
String _path = "/user/createWithList";
|
||||
/// Creates list of users with given input array
|
||||
///
|
||||
///
|
||||
Future<Response>createUsersWithListInput(
|
||||
BuiltList<User> user, {
|
||||
CancelToken cancelToken,
|
||||
Map<String, String> headers,
|
||||
ProgressCallback onSendProgress,
|
||||
ProgressCallback onReceiveProgress,
|
||||
}) async {
|
||||
final String _path = '/user/createWithList';
|
||||
|
||||
Map<String, dynamic> queryParams = {};
|
||||
Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
final Map<String, dynamic> queryParams = {};
|
||||
final Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
dynamic bodyData;
|
||||
|
||||
queryParams.removeWhere((key, value) => value == null);
|
||||
headerParams.removeWhere((key, value) => value == null);
|
||||
|
||||
List<String> contentTypes = ["application/json"];
|
||||
final List<String> contentTypes = [
|
||||
'application/json',
|
||||
];
|
||||
|
||||
const type = FullType(BuiltList, [FullType(User)]);
|
||||
final serializedBody = _serializers.serialize(user, specifiedType: type);
|
||||
final jsonuser = json.encode(serializedBody);
|
||||
bodyData = jsonuser;
|
||||
|
||||
const type = FullType(BuiltList, [FullType(User)]);
|
||||
final serializedBody = _serializers.serialize(user, specifiedType: type);
|
||||
final jsonuser = json.encode(serializedBody);
|
||||
bodyData = jsonuser;
|
||||
|
||||
return _dio.request(
|
||||
return _dio.request(
|
||||
_path,
|
||||
queryParameters: queryParams,
|
||||
data: bodyData,
|
||||
options: Options(
|
||||
method: 'post'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [ {"type": "apiKey", "name": "api_key", "keyName": "api_key", "where": "header" }],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json",
|
||||
method: 'post'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'api_key',
|
||||
'where': 'header',
|
||||
},
|
||||
],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : 'application/json',
|
||||
),
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
}
|
||||
/// Delete user
|
||||
///
|
||||
/// This can only be done by the logged in user.
|
||||
Future<Response>deleteUser(String username,{ CancelToken cancelToken, Map<String, String> headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async {
|
||||
);
|
||||
}
|
||||
|
||||
String _path = "/user/{username}".replaceAll("{" r'username' "}", username.toString());
|
||||
/// Delete user
|
||||
///
|
||||
/// This can only be done by the logged in user.
|
||||
Future<Response>deleteUser(
|
||||
String username, {
|
||||
CancelToken cancelToken,
|
||||
Map<String, String> headers,
|
||||
ProgressCallback onSendProgress,
|
||||
ProgressCallback onReceiveProgress,
|
||||
}) async {
|
||||
final String _path = '/user/{username}'.replaceAll('{' r'username' '}', username.toString());
|
||||
|
||||
Map<String, dynamic> queryParams = {};
|
||||
Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
final Map<String, dynamic> queryParams = {};
|
||||
final Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
dynamic bodyData;
|
||||
|
||||
queryParams.removeWhere((key, value) => value == null);
|
||||
headerParams.removeWhere((key, value) => value == null);
|
||||
|
||||
List<String> contentTypes = [];
|
||||
final List<String> contentTypes = [];
|
||||
|
||||
|
||||
|
||||
return _dio.request(
|
||||
return _dio.request(
|
||||
_path,
|
||||
queryParameters: queryParams,
|
||||
data: bodyData,
|
||||
options: Options(
|
||||
method: 'delete'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [ {"type": "apiKey", "name": "api_key", "keyName": "api_key", "where": "header" }],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json",
|
||||
method: 'delete'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'api_key',
|
||||
'where': 'header',
|
||||
},
|
||||
],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : 'application/json',
|
||||
),
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
}
|
||||
/// Get user by user name
|
||||
///
|
||||
///
|
||||
Future<Response<User>>getUserByName(String username,{ CancelToken cancelToken, Map<String, String> headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async {
|
||||
);
|
||||
}
|
||||
|
||||
String _path = "/user/{username}".replaceAll("{" r'username' "}", username.toString());
|
||||
/// Get user by user name
|
||||
///
|
||||
///
|
||||
Future<Response<User>>getUserByName(
|
||||
String username, {
|
||||
CancelToken cancelToken,
|
||||
Map<String, String> headers,
|
||||
ProgressCallback onSendProgress,
|
||||
ProgressCallback onReceiveProgress,
|
||||
}) async {
|
||||
final String _path = '/user/{username}'.replaceAll('{' r'username' '}', username.toString());
|
||||
|
||||
Map<String, dynamic> queryParams = {};
|
||||
Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
final Map<String, dynamic> queryParams = {};
|
||||
final Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
dynamic bodyData;
|
||||
|
||||
queryParams.removeWhere((key, value) => value == null);
|
||||
headerParams.removeWhere((key, value) => value == null);
|
||||
|
||||
List<String> contentTypes = [];
|
||||
final List<String> contentTypes = [];
|
||||
|
||||
|
||||
|
||||
return _dio.request(
|
||||
return _dio.request(
|
||||
_path,
|
||||
queryParameters: queryParams,
|
||||
data: bodyData,
|
||||
options: Options(
|
||||
method: 'get'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json",
|
||||
method: 'get'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : 'application/json',
|
||||
),
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
).then((response) {
|
||||
|
||||
).then((response) {
|
||||
final serializer = _serializers.serializerForType(User);
|
||||
final data = _serializers.deserializeWith<User>(serializer, response.data is String ? jsonDecode(response.data) : response.data);
|
||||
|
||||
@ -211,45 +265,49 @@ class UserApi {
|
||||
statusMessage: response.statusMessage,
|
||||
extra: response.extra,
|
||||
);
|
||||
});
|
||||
}
|
||||
/// Logs user into the system
|
||||
///
|
||||
///
|
||||
Future<Response<String>>loginUser(String username,String password,{ CancelToken cancelToken, Map<String, String> headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async {
|
||||
});
|
||||
}
|
||||
|
||||
String _path = "/user/login";
|
||||
/// Logs user into the system
|
||||
///
|
||||
///
|
||||
Future<Response<String>>loginUser(
|
||||
String username,
|
||||
String password, {
|
||||
CancelToken cancelToken,
|
||||
Map<String, String> headers,
|
||||
ProgressCallback onSendProgress,
|
||||
ProgressCallback onReceiveProgress,
|
||||
}) async {
|
||||
final String _path = '/user/login';
|
||||
|
||||
Map<String, dynamic> queryParams = {};
|
||||
Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
final Map<String, dynamic> queryParams = {};
|
||||
final Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
dynamic bodyData;
|
||||
|
||||
queryParams[r'username'] = username;
|
||||
queryParams[r'password'] = password;
|
||||
queryParams[r'username'] = username;
|
||||
queryParams[r'password'] = password;
|
||||
queryParams.removeWhere((key, value) => value == null);
|
||||
headerParams.removeWhere((key, value) => value == null);
|
||||
|
||||
List<String> contentTypes = [];
|
||||
final List<String> contentTypes = [];
|
||||
|
||||
|
||||
|
||||
return _dio.request(
|
||||
return _dio.request(
|
||||
_path,
|
||||
queryParameters: queryParams,
|
||||
data: bodyData,
|
||||
options: Options(
|
||||
method: 'get'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json",
|
||||
method: 'get'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : 'application/json',
|
||||
),
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
).then((response) {
|
||||
|
||||
).then((response) {
|
||||
final data = response.data as String;
|
||||
|
||||
return Response<String>(
|
||||
@ -261,79 +319,105 @@ class UserApi {
|
||||
statusMessage: response.statusMessage,
|
||||
extra: response.extra,
|
||||
);
|
||||
});
|
||||
}
|
||||
/// Logs out current logged in user session
|
||||
///
|
||||
///
|
||||
Future<Response>logoutUser({ CancelToken cancelToken, Map<String, String> headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async {
|
||||
});
|
||||
}
|
||||
|
||||
String _path = "/user/logout";
|
||||
/// Logs out current logged in user session
|
||||
///
|
||||
///
|
||||
Future<Response>logoutUser({
|
||||
CancelToken cancelToken,
|
||||
Map<String, String> headers,
|
||||
ProgressCallback onSendProgress,
|
||||
ProgressCallback onReceiveProgress,
|
||||
}) async {
|
||||
final String _path = '/user/logout';
|
||||
|
||||
Map<String, dynamic> queryParams = {};
|
||||
Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
final Map<String, dynamic> queryParams = {};
|
||||
final Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
dynamic bodyData;
|
||||
|
||||
queryParams.removeWhere((key, value) => value == null);
|
||||
headerParams.removeWhere((key, value) => value == null);
|
||||
|
||||
List<String> contentTypes = [];
|
||||
final List<String> contentTypes = [];
|
||||
|
||||
|
||||
|
||||
return _dio.request(
|
||||
return _dio.request(
|
||||
_path,
|
||||
queryParameters: queryParams,
|
||||
data: bodyData,
|
||||
options: Options(
|
||||
method: 'get'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [ {"type": "apiKey", "name": "api_key", "keyName": "api_key", "where": "header" }],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json",
|
||||
method: 'get'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'api_key',
|
||||
'where': 'header',
|
||||
},
|
||||
],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : 'application/json',
|
||||
),
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
}
|
||||
/// Updated user
|
||||
///
|
||||
/// This can only be done by the logged in user.
|
||||
Future<Response>updateUser(String username,User user,{ CancelToken cancelToken, Map<String, String> headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async {
|
||||
);
|
||||
}
|
||||
|
||||
String _path = "/user/{username}".replaceAll("{" r'username' "}", username.toString());
|
||||
/// Updated user
|
||||
///
|
||||
/// This can only be done by the logged in user.
|
||||
Future<Response>updateUser(
|
||||
String username,
|
||||
User user, {
|
||||
CancelToken cancelToken,
|
||||
Map<String, String> headers,
|
||||
ProgressCallback onSendProgress,
|
||||
ProgressCallback onReceiveProgress,
|
||||
}) async {
|
||||
final String _path = '/user/{username}'.replaceAll('{' r'username' '}', username.toString());
|
||||
|
||||
Map<String, dynamic> queryParams = {};
|
||||
Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
final Map<String, dynamic> queryParams = {};
|
||||
final Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
dynamic bodyData;
|
||||
|
||||
queryParams.removeWhere((key, value) => value == null);
|
||||
headerParams.removeWhere((key, value) => value == null);
|
||||
|
||||
List<String> contentTypes = ["application/json"];
|
||||
final List<String> contentTypes = [
|
||||
'application/json',
|
||||
];
|
||||
|
||||
final serializedBody = _serializers.serialize(user);
|
||||
final jsonuser = json.encode(serializedBody);
|
||||
bodyData = jsonuser;
|
||||
|
||||
final serializedBody = _serializers.serialize(user);
|
||||
final jsonuser = json.encode(serializedBody);
|
||||
bodyData = jsonuser;
|
||||
|
||||
return _dio.request(
|
||||
return _dio.request(
|
||||
_path,
|
||||
queryParameters: queryParams,
|
||||
data: bodyData,
|
||||
options: Options(
|
||||
method: 'put'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [ {"type": "apiKey", "name": "api_key", "keyName": "api_key", "where": "header" }],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json",
|
||||
method: 'put'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'api_key',
|
||||
'where': 'header',
|
||||
},
|
||||
],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : 'application/json',
|
||||
),
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -5,15 +5,14 @@ part 'api_response.g.dart';
|
||||
|
||||
abstract class ApiResponse implements Built<ApiResponse, ApiResponseBuilder> {
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'code')
|
||||
int get code;
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'type')
|
||||
String get type;
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'message')
|
||||
String get message;
|
||||
|
@ -5,11 +5,10 @@ part 'category.g.dart';
|
||||
|
||||
abstract class Category implements Built<Category, CategoryBuilder> {
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'id')
|
||||
int get id;
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'name')
|
||||
String get name;
|
||||
|
@ -5,11 +5,12 @@ part 'inline_object.g.dart';
|
||||
|
||||
abstract class InlineObject implements Built<InlineObject, InlineObjectBuilder> {
|
||||
|
||||
/* Updated name of the pet */
|
||||
/// Updated name of the pet
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'name')
|
||||
String get name;
|
||||
/* Updated status of the pet */
|
||||
|
||||
/// Updated status of the pet
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'status')
|
||||
String get status;
|
||||
|
@ -6,11 +6,12 @@ part 'inline_object1.g.dart';
|
||||
|
||||
abstract class InlineObject1 implements Built<InlineObject1, InlineObject1Builder> {
|
||||
|
||||
/* Additional data to pass to server */
|
||||
/// Additional data to pass to server
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'additionalMetadata')
|
||||
String get additionalMetadata;
|
||||
/* file to upload */
|
||||
|
||||
/// file to upload
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'file')
|
||||
Uint8List get file;
|
||||
|
@ -6,28 +6,28 @@ part 'order.g.dart';
|
||||
|
||||
abstract class Order implements Built<Order, OrderBuilder> {
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'id')
|
||||
int get id;
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'petId')
|
||||
int get petId;
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'quantity')
|
||||
int get quantity;
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'shipDate')
|
||||
DateTime get shipDate;
|
||||
/* Order Status */
|
||||
|
||||
/// Order Status
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'status')
|
||||
OrderStatusEnum get status;
|
||||
// enum statusEnum { placed, approved, delivered, };
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'complete')
|
||||
bool get complete;
|
||||
|
@ -8,27 +8,27 @@ part 'pet.g.dart';
|
||||
|
||||
abstract class Pet implements Built<Pet, PetBuilder> {
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'id')
|
||||
int get id;
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'category')
|
||||
Category get category;
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'name')
|
||||
String get name;
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'photoUrls')
|
||||
BuiltList<String> get photoUrls;
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'tags')
|
||||
BuiltList<Tag> get tags;
|
||||
/* pet status in the store */
|
||||
|
||||
/// pet status in the store
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'status')
|
||||
PetStatusEnum get status;
|
||||
|
@ -5,11 +5,10 @@ part 'tag.g.dart';
|
||||
|
||||
abstract class Tag implements Built<Tag, TagBuilder> {
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'id')
|
||||
int get id;
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'name')
|
||||
String get name;
|
||||
|
@ -5,35 +5,35 @@ part 'user.g.dart';
|
||||
|
||||
abstract class User implements Built<User, UserBuilder> {
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'id')
|
||||
int get id;
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'username')
|
||||
String get username;
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'firstName')
|
||||
String get firstName;
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'lastName')
|
||||
String get lastName;
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'email')
|
||||
String get email;
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'password')
|
||||
String get password;
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'phone')
|
||||
String get phone;
|
||||
/* User Status */
|
||||
|
||||
/// User Status
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'userStatus')
|
||||
int get userStatus;
|
||||
|
@ -8,8 +8,8 @@ import 'package:openapi/api.dart';
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**mapProperty** | **BuiltMap<String, String>** | | [optional] [default to const {}]
|
||||
**mapOfMapProperty** | [**BuiltMap<String, BuiltMap<String, String>>**](BuiltMap.md) | | [optional] [default to const {}]
|
||||
**mapProperty** | **BuiltMap<String, String>** | | [optional] [default to const {}]
|
||||
**mapOfMapProperty** | [**BuiltMap<String, BuiltMap<String, String>>**](BuiltMap.md) | | [optional] [default to const {}]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -30,7 +30,7 @@ try {
|
||||
var result = api_instance.call123testSpecialTags(client);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print("Exception when calling AnotherFakeApi->call123testSpecialTags: $e\n");
|
||||
print('Exception when calling AnotherFakeApi->call123testSpecialTags: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -8,7 +8,7 @@ import 'package:openapi/api.dart';
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**arrayArrayNumber** | [**BuiltList<BuiltList<num>>**](BuiltList.md) | | [optional] [default to const []]
|
||||
**arrayArrayNumber** | [**BuiltList<BuiltList<num>>**](BuiltList.md) | | [optional] [default to const []]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -8,7 +8,7 @@ import 'package:openapi/api.dart';
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**arrayNumber** | **BuiltList<num>** | | [optional] [default to const []]
|
||||
**arrayNumber** | **BuiltList<num>** | | [optional] [default to const []]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -8,9 +8,9 @@ import 'package:openapi/api.dart';
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**arrayOfString** | **BuiltList<String>** | | [optional] [default to const []]
|
||||
**arrayArrayOfInteger** | [**BuiltList<BuiltList<int>>**](BuiltList.md) | | [optional] [default to const []]
|
||||
**arrayArrayOfModel** | [**BuiltList<BuiltList<ReadOnlyFirst>>**](BuiltList.md) | | [optional] [default to const []]
|
||||
**arrayOfString** | **BuiltList<String>** | | [optional] [default to const []]
|
||||
**arrayArrayOfInteger** | [**BuiltList<BuiltList<int>>**](BuiltList.md) | | [optional] [default to const []]
|
||||
**arrayArrayOfModel** | [**BuiltList<BuiltList<ReadOnlyFirst>>**](BuiltList.md) | | [optional] [default to const []]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -27,7 +27,7 @@ try {
|
||||
var result = api_instance.fooGet();
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print("Exception when calling DefaultApi->fooGet: $e\n");
|
||||
print('Exception when calling DefaultApi->fooGet: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -9,7 +9,7 @@ import 'package:openapi/api.dart';
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**justSymbol** | **String** | | [optional] [default to null]
|
||||
**arrayEnum** | **BuiltList<String>** | | [optional] [default to const []]
|
||||
**arrayEnum** | **BuiltList<String>** | | [optional] [default to const []]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -41,7 +41,7 @@ try {
|
||||
var result = api_instance.fakeHealthGet();
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print("Exception when calling FakeApi->fakeHealthGet: $e\n");
|
||||
print('Exception when calling FakeApi->fakeHealthGet: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
@ -83,7 +83,7 @@ var header1 = header1_example; // String | header parameter
|
||||
try {
|
||||
api_instance.fakeHttpSignatureTest(pet, query1, header1);
|
||||
} catch (e) {
|
||||
print("Exception when calling FakeApi->fakeHttpSignatureTest: $e\n");
|
||||
print('Exception when calling FakeApi->fakeHttpSignatureTest: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
@ -128,7 +128,7 @@ try {
|
||||
var result = api_instance.fakeOuterBooleanSerialize(body);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print("Exception when calling FakeApi->fakeOuterBooleanSerialize: $e\n");
|
||||
print('Exception when calling FakeApi->fakeOuterBooleanSerialize: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
@ -171,7 +171,7 @@ try {
|
||||
var result = api_instance.fakeOuterCompositeSerialize(outerComposite);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print("Exception when calling FakeApi->fakeOuterCompositeSerialize: $e\n");
|
||||
print('Exception when calling FakeApi->fakeOuterCompositeSerialize: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
@ -214,7 +214,7 @@ try {
|
||||
var result = api_instance.fakeOuterNumberSerialize(body);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print("Exception when calling FakeApi->fakeOuterNumberSerialize: $e\n");
|
||||
print('Exception when calling FakeApi->fakeOuterNumberSerialize: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
@ -257,7 +257,7 @@ try {
|
||||
var result = api_instance.fakeOuterStringSerialize(body);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print("Exception when calling FakeApi->fakeOuterStringSerialize: $e\n");
|
||||
print('Exception when calling FakeApi->fakeOuterStringSerialize: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
@ -299,7 +299,7 @@ var fileSchemaTestClass = new FileSchemaTestClass(); // FileSchemaTestClass |
|
||||
try {
|
||||
api_instance.testBodyWithFileSchema(fileSchemaTestClass);
|
||||
} catch (e) {
|
||||
print("Exception when calling FakeApi->testBodyWithFileSchema: $e\n");
|
||||
print('Exception when calling FakeApi->testBodyWithFileSchema: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
@ -340,7 +340,7 @@ var user = new User(); // User |
|
||||
try {
|
||||
api_instance.testBodyWithQueryParams(query, user);
|
||||
} catch (e) {
|
||||
print("Exception when calling FakeApi->testBodyWithQueryParams: $e\n");
|
||||
print('Exception when calling FakeApi->testBodyWithQueryParams: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
@ -384,7 +384,7 @@ try {
|
||||
var result = api_instance.testClientModel(client);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print("Exception when calling FakeApi->testClientModel: $e\n");
|
||||
print('Exception when calling FakeApi->testClientModel: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
@ -442,7 +442,7 @@ var callback = callback_example; // String | None
|
||||
try {
|
||||
api_instance.testEndpointParameters(number, double_, patternWithoutDelimiter, byte, integer, int32, int64, float, string, binary, date, dateTime, password, callback);
|
||||
} catch (e) {
|
||||
print("Exception when calling FakeApi->testEndpointParameters: $e\n");
|
||||
print('Exception when calling FakeApi->testEndpointParameters: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
@ -504,7 +504,7 @@ var enumFormString = enumFormString_example; // String | Form parameter enum tes
|
||||
try {
|
||||
api_instance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
|
||||
} catch (e) {
|
||||
print("Exception when calling FakeApi->testEnumParameters: $e\n");
|
||||
print('Exception when calling FakeApi->testEnumParameters: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
@ -512,14 +512,14 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**enumHeaderStringArray** | [**BuiltList<String>**](String.md)| Header parameter enum test (string array) | [optional] [default to const []]
|
||||
**enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to '-efg']
|
||||
**enumQueryStringArray** | [**BuiltList<String>**](String.md)| Query parameter enum test (string array) | [optional] [default to const []]
|
||||
**enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to '-efg']
|
||||
**enumHeaderStringArray** | [**BuiltList<String>**](String.md)| Header parameter enum test (string array) | [optional] [default to const []]
|
||||
**enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to '-efg']
|
||||
**enumQueryStringArray** | [**BuiltList<String>**](String.md)| Query parameter enum test (string array) | [optional] [default to const []]
|
||||
**enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to '-efg']
|
||||
**enumQueryInteger** | **int**| Query parameter enum test (double) | [optional] [default to null]
|
||||
**enumQueryDouble** | **double**| Query parameter enum test (double) | [optional] [default to null]
|
||||
**enumFormStringArray** | [**BuiltList<String>**](String.md)| Form parameter enum test (string array) | [optional] [default to '$']
|
||||
**enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to '-efg']
|
||||
**enumFormStringArray** | [**BuiltList<String>**](String.md)| Form parameter enum test (string array) | [optional] [default to '$']
|
||||
**enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to '-efg']
|
||||
|
||||
### Return type
|
||||
|
||||
@ -561,7 +561,7 @@ var int64Group = 789; // int | Integer in group parameters
|
||||
try {
|
||||
api_instance.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group);
|
||||
} catch (e) {
|
||||
print("Exception when calling FakeApi->testGroupParameters: $e\n");
|
||||
print('Exception when calling FakeApi->testGroupParameters: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
@ -601,12 +601,12 @@ test inline additionalProperties
|
||||
import 'package:openapi/api.dart';
|
||||
|
||||
var api_instance = new FakeApi();
|
||||
var requestBody = new BuiltMap<String, String>(); // BuiltMap<String, String> | request body
|
||||
var requestBody = new BuiltMap<String, String>(); // BuiltMap<String, String> | request body
|
||||
|
||||
try {
|
||||
api_instance.testInlineAdditionalProperties(requestBody);
|
||||
} catch (e) {
|
||||
print("Exception when calling FakeApi->testInlineAdditionalProperties: $e\n");
|
||||
print('Exception when calling FakeApi->testInlineAdditionalProperties: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
@ -614,7 +614,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**requestBody** | [**BuiltMap<String, String>**](String.md)| request body |
|
||||
**requestBody** | [**BuiltMap<String, String>**](String.md)| request body |
|
||||
|
||||
### Return type
|
||||
|
||||
@ -647,7 +647,7 @@ var param2 = param2_example; // String | field2
|
||||
try {
|
||||
api_instance.testJsonFormData(param, param2);
|
||||
} catch (e) {
|
||||
print("Exception when calling FakeApi->testJsonFormData: $e\n");
|
||||
print('Exception when calling FakeApi->testJsonFormData: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
@ -694,7 +694,7 @@ var context = []; // BuiltList<String> |
|
||||
try {
|
||||
api_instance.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context);
|
||||
} catch (e) {
|
||||
print("Exception when calling FakeApi->testQueryParameterCollectionFormat: $e\n");
|
||||
print('Exception when calling FakeApi->testQueryParameterCollectionFormat: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
@ -702,11 +702,11 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**pipe** | [**BuiltList<String>**](String.md)| | [default to const []]
|
||||
**ioutil** | [**BuiltList<String>**](String.md)| | [default to const []]
|
||||
**http** | [**BuiltList<String>**](String.md)| | [default to const []]
|
||||
**url** | [**BuiltList<String>**](String.md)| | [default to const []]
|
||||
**context** | [**BuiltList<String>**](String.md)| | [default to const []]
|
||||
**pipe** | [**BuiltList<String>**](String.md)| | [default to const []]
|
||||
**ioutil** | [**BuiltList<String>**](String.md)| | [default to const []]
|
||||
**http** | [**BuiltList<String>**](String.md)| | [default to const []]
|
||||
**url** | [**BuiltList<String>**](String.md)| | [default to const []]
|
||||
**context** | [**BuiltList<String>**](String.md)| | [default to const []]
|
||||
|
||||
### Return type
|
||||
|
||||
|
@ -34,7 +34,7 @@ try {
|
||||
var result = api_instance.testClassname(client);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print("Exception when calling FakeClassnameTags123Api->testClassname: $e\n");
|
||||
print('Exception when calling FakeClassnameTags123Api->testClassname: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -9,7 +9,7 @@ import 'package:openapi/api.dart';
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**file** | [**MultipartFile**](MultipartFile.md) | | [optional] [default to null]
|
||||
**files** | [**BuiltList<MultipartFile>**](MultipartFile.md) | | [optional] [default to const []]
|
||||
**files** | [**BuiltList<MultipartFile>**](MultipartFile.md) | | [optional] [default to const []]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -23,7 +23,7 @@ Name | Type | Description | Notes
|
||||
**uuid** | **String** | | [optional] [default to null]
|
||||
**password** | **String** | | [default to null]
|
||||
**patternWithDigits** | **String** | A string that is a 10 digit number. Can have leading zeros. | [optional] [default to null]
|
||||
**patternWithDigitsAndDelimiter** | **String** | A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. | [optional] [default to null]
|
||||
**patternWithDigitsAndDelimiter** | **String** | A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. | [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)
|
||||
|
||||
|
@ -8,7 +8,7 @@ import 'package:openapi/api.dart';
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**enumFormStringArray** | **BuiltList<String>** | Form parameter enum test (string array) | [optional] [default to const []]
|
||||
**enumFormStringArray** | **BuiltList<String>** | Form parameter enum test (string array) | [optional] [default to const []]
|
||||
**enumFormString** | **String** | Form parameter enum test (string) | [optional] [default to '-efg']
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
@ -8,10 +8,10 @@ import 'package:openapi/api.dart';
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**mapMapOfString** | [**BuiltMap<String, BuiltMap<String, String>>**](BuiltMap.md) | | [optional] [default to const {}]
|
||||
**mapOfEnumString** | **BuiltMap<String, String>** | | [optional] [default to const {}]
|
||||
**directMap** | **BuiltMap<String, bool>** | | [optional] [default to const {}]
|
||||
**indirectMap** | **BuiltMap<String, bool>** | | [optional] [default to const {}]
|
||||
**mapMapOfString** | [**BuiltMap<String, BuiltMap<String, String>>**](BuiltMap.md) | | [optional] [default to const {}]
|
||||
**mapOfEnumString** | **BuiltMap<String, String>** | | [optional] [default to const {}]
|
||||
**directMap** | **BuiltMap<String, bool>** | | [optional] [default to const {}]
|
||||
**indirectMap** | **BuiltMap<String, bool>** | | [optional] [default to const {}]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -10,7 +10,7 @@ Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**uuid** | **String** | | [optional] [default to null]
|
||||
**dateTime** | [**DateTime**](DateTime.md) | | [optional] [default to null]
|
||||
**map** | [**BuiltMap<String, Animal>**](Animal.md) | | [optional] [default to const {}]
|
||||
**map** | [**BuiltMap<String, Animal>**](Animal.md) | | [optional] [default to const {}]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -14,12 +14,12 @@ Name | Type | Description | Notes
|
||||
**stringProp** | **String** | | [optional] [default to null]
|
||||
**dateProp** | [**DateTime**](DateTime.md) | | [optional] [default to null]
|
||||
**datetimeProp** | [**DateTime**](DateTime.md) | | [optional] [default to null]
|
||||
**arrayNullableProp** | [**BuiltList<JsonObject>**](JsonObject.md) | | [optional] [default to const []]
|
||||
**arrayAndItemsNullableProp** | [**BuiltList<JsonObject>**](JsonObject.md) | | [optional] [default to const []]
|
||||
**arrayItemsNullable** | [**BuiltList<JsonObject>**](JsonObject.md) | | [optional] [default to const []]
|
||||
**objectNullableProp** | [**BuiltMap<String, JsonObject>**](JsonObject.md) | | [optional] [default to const {}]
|
||||
**objectAndItemsNullableProp** | [**BuiltMap<String, JsonObject>**](JsonObject.md) | | [optional] [default to const {}]
|
||||
**objectItemsNullable** | [**BuiltMap<String, JsonObject>**](JsonObject.md) | | [optional] [default to const {}]
|
||||
**arrayNullableProp** | [**BuiltList<JsonObject>**](JsonObject.md) | | [optional] [default to const []]
|
||||
**arrayAndItemsNullableProp** | [**BuiltList<JsonObject>**](JsonObject.md) | | [optional] [default to const []]
|
||||
**arrayItemsNullable** | [**BuiltList<JsonObject>**](JsonObject.md) | | [optional] [default to const []]
|
||||
**objectNullableProp** | [**BuiltMap<String, JsonObject>**](JsonObject.md) | | [optional] [default to const {}]
|
||||
**objectAndItemsNullableProp** | [**BuiltMap<String, JsonObject>**](JsonObject.md) | | [optional] [default to const {}]
|
||||
**objectItemsNullable** | [**BuiltMap<String, JsonObject>**](JsonObject.md) | | [optional] [default to const {}]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -11,8 +11,8 @@ Name | Type | Description | Notes
|
||||
**id** | **int** | | [optional] [default to null]
|
||||
**category** | [**Category**](Category.md) | | [optional] [default to null]
|
||||
**name** | **String** | | [default to null]
|
||||
**photoUrls** | **BuiltList<String>** | | [default to const []]
|
||||
**tags** | [**BuiltList<Tag>**](Tag.md) | | [optional] [default to const []]
|
||||
**photoUrls** | **BuiltList<String>** | | [default to const []]
|
||||
**tags** | [**BuiltList<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)
|
||||
|
@ -37,7 +37,7 @@ var pet = new Pet(); // Pet | Pet object that needs to be added to the store
|
||||
try {
|
||||
api_instance.addPet(pet);
|
||||
} catch (e) {
|
||||
print("Exception when calling PetApi->addPet: $e\n");
|
||||
print('Exception when calling PetApi->addPet: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
@ -80,7 +80,7 @@ var apiKey = apiKey_example; // String |
|
||||
try {
|
||||
api_instance.deletePet(petId, apiKey);
|
||||
} catch (e) {
|
||||
print("Exception when calling PetApi->deletePet: $e\n");
|
||||
print('Exception when calling PetApi->deletePet: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
@ -126,7 +126,7 @@ try {
|
||||
var result = api_instance.findPetsByStatus(status);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print("Exception when calling PetApi->findPetsByStatus: $e\n");
|
||||
print('Exception when calling PetApi->findPetsByStatus: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
@ -134,7 +134,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**status** | [**BuiltList<String>**](String.md)| Status values that need to be considered for filter | [default to const []]
|
||||
**status** | [**BuiltList<String>**](String.md)| Status values that need to be considered for filter | [default to const []]
|
||||
|
||||
### Return type
|
||||
|
||||
@ -171,7 +171,7 @@ try {
|
||||
var result = api_instance.findPetsByTags(tags);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print("Exception when calling PetApi->findPetsByTags: $e\n");
|
||||
print('Exception when calling PetApi->findPetsByTags: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
@ -179,7 +179,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**tags** | [**BuiltList<String>**](String.md)| Tags to filter by | [default to const []]
|
||||
**tags** | [**BuiltList<String>**](String.md)| Tags to filter by | [default to const []]
|
||||
|
||||
### Return type
|
||||
|
||||
@ -218,7 +218,7 @@ try {
|
||||
var result = api_instance.getPetById(petId);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print("Exception when calling PetApi->getPetById: $e\n");
|
||||
print('Exception when calling PetApi->getPetById: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
@ -260,7 +260,7 @@ var pet = new Pet(); // Pet | Pet object that needs to be added to the store
|
||||
try {
|
||||
api_instance.updatePet(pet);
|
||||
} catch (e) {
|
||||
print("Exception when calling PetApi->updatePet: $e\n");
|
||||
print('Exception when calling PetApi->updatePet: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
@ -304,7 +304,7 @@ 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");
|
||||
print('Exception when calling PetApi->updatePetWithForm: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
@ -351,7 +351,7 @@ try {
|
||||
var result = api_instance.uploadFile(petId, additionalMetadata, file);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print("Exception when calling PetApi->uploadFile: $e\n");
|
||||
print('Exception when calling PetApi->uploadFile: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
@ -398,7 +398,7 @@ try {
|
||||
var result = api_instance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print("Exception when calling PetApi->uploadFileWithRequiredFile: $e\n");
|
||||
print('Exception when calling PetApi->uploadFileWithRequiredFile: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -32,7 +32,7 @@ var orderId = orderId_example; // String | ID of the order that needs to be dele
|
||||
try {
|
||||
api_instance.deleteOrder(orderId);
|
||||
} catch (e) {
|
||||
print("Exception when calling StoreApi->deleteOrder: $e\n");
|
||||
print('Exception when calling StoreApi->deleteOrder: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
@ -78,7 +78,7 @@ try {
|
||||
var result = api_instance.getInventory();
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print("Exception when calling StoreApi->getInventory: $e\n");
|
||||
print('Exception when calling StoreApi->getInventory: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
@ -118,7 +118,7 @@ try {
|
||||
var result = api_instance.getOrderById(orderId);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print("Exception when calling StoreApi->getOrderById: $e\n");
|
||||
print('Exception when calling StoreApi->getOrderById: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
@ -159,7 +159,7 @@ try {
|
||||
var result = api_instance.placeOrder(order);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print("Exception when calling StoreApi->placeOrder: $e\n");
|
||||
print('Exception when calling StoreApi->placeOrder: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -36,7 +36,7 @@ var user = new User(); // User | Created user object
|
||||
try {
|
||||
api_instance.createUser(user);
|
||||
} catch (e) {
|
||||
print("Exception when calling UserApi->createUser: $e\n");
|
||||
print('Exception when calling UserApi->createUser: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
@ -71,12 +71,12 @@ Creates list of users with given input array
|
||||
import 'package:openapi/api.dart';
|
||||
|
||||
var api_instance = new UserApi();
|
||||
var user = [new BuiltList<User>()]; // BuiltList<User> | List of user object
|
||||
var user = [new BuiltList<User>()]; // BuiltList<User> | List of user object
|
||||
|
||||
try {
|
||||
api_instance.createUsersWithArrayInput(user);
|
||||
} catch (e) {
|
||||
print("Exception when calling UserApi->createUsersWithArrayInput: $e\n");
|
||||
print('Exception when calling UserApi->createUsersWithArrayInput: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
@ -84,7 +84,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**user** | [**BuiltList<User>**](User.md)| List of user object |
|
||||
**user** | [**BuiltList<User>**](User.md)| List of user object |
|
||||
|
||||
### Return type
|
||||
|
||||
@ -111,12 +111,12 @@ Creates list of users with given input array
|
||||
import 'package:openapi/api.dart';
|
||||
|
||||
var api_instance = new UserApi();
|
||||
var user = [new BuiltList<User>()]; // BuiltList<User> | List of user object
|
||||
var user = [new BuiltList<User>()]; // BuiltList<User> | List of user object
|
||||
|
||||
try {
|
||||
api_instance.createUsersWithListInput(user);
|
||||
} catch (e) {
|
||||
print("Exception when calling UserApi->createUsersWithListInput: $e\n");
|
||||
print('Exception when calling UserApi->createUsersWithListInput: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
@ -124,7 +124,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**user** | [**BuiltList<User>**](User.md)| List of user object |
|
||||
**user** | [**BuiltList<User>**](User.md)| List of user object |
|
||||
|
||||
### Return type
|
||||
|
||||
@ -158,7 +158,7 @@ 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");
|
||||
print('Exception when calling UserApi->deleteUser: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
@ -199,7 +199,7 @@ try {
|
||||
var result = api_instance.getUserByName(username);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print("Exception when calling UserApi->getUserByName: $e\n");
|
||||
print('Exception when calling UserApi->getUserByName: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
@ -241,7 +241,7 @@ try {
|
||||
var result = api_instance.loginUser(username, password);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print("Exception when calling UserApi->loginUser: $e\n");
|
||||
print('Exception when calling UserApi->loginUser: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
@ -281,7 +281,7 @@ var api_instance = new UserApi();
|
||||
try {
|
||||
api_instance.logoutUser();
|
||||
} catch (e) {
|
||||
print("Exception when calling UserApi->logoutUser: $e\n");
|
||||
print('Exception when calling UserApi->logoutUser: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
@ -321,7 +321,7 @@ var user = new User(); // User | Updated user object
|
||||
try {
|
||||
api_instance.updateUser(username, user);
|
||||
} catch (e) {
|
||||
print("Exception when calling UserApi->updateUser: $e\n");
|
||||
print('Exception when calling UserApi->updateUser: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -21,7 +21,7 @@ class Openapi {
|
||||
|
||||
Dio dio;
|
||||
Serializers serializers;
|
||||
String basePath = "http://petstore.swagger.io:80/v2";
|
||||
String basePath = 'http://petstore.swagger.io:80/v2';
|
||||
|
||||
Openapi({this.dio, Serializers serializers, String basePathOverride, List<Interceptor> interceptors}) {
|
||||
if (dio == null) {
|
||||
|
@ -1,5 +1,4 @@
|
||||
import 'dart:async';
|
||||
import 'dart:io';
|
||||
import 'dart:convert';
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
@ -12,44 +11,49 @@ class AnotherFakeApi {
|
||||
|
||||
AnotherFakeApi(this._dio, this._serializers);
|
||||
|
||||
/// To test special tags
|
||||
///
|
||||
/// To test special tags and operation ID starting with number
|
||||
Future<Response<Client>>call123testSpecialTags(Client client,{ CancelToken cancelToken, Map<String, String> headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async {
|
||||
/// To test special tags
|
||||
///
|
||||
/// To test special tags and operation ID starting with number
|
||||
Future<Response<Client>>call123testSpecialTags(
|
||||
Client client, {
|
||||
CancelToken cancelToken,
|
||||
Map<String, String> headers,
|
||||
ProgressCallback onSendProgress,
|
||||
ProgressCallback onReceiveProgress,
|
||||
}) async {
|
||||
final String _path = '/another-fake/dummy';
|
||||
|
||||
String _path = "/another-fake/dummy";
|
||||
|
||||
Map<String, dynamic> queryParams = {};
|
||||
Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
final Map<String, dynamic> queryParams = {};
|
||||
final Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
dynamic bodyData;
|
||||
|
||||
queryParams.removeWhere((key, value) => value == null);
|
||||
headerParams.removeWhere((key, value) => value == null);
|
||||
|
||||
List<String> contentTypes = ["application/json"];
|
||||
final List<String> contentTypes = [
|
||||
'application/json',
|
||||
];
|
||||
|
||||
final serializedBody = _serializers.serialize(client);
|
||||
final jsonclient = json.encode(serializedBody);
|
||||
bodyData = jsonclient;
|
||||
|
||||
final serializedBody = _serializers.serialize(client);
|
||||
final jsonclient = json.encode(serializedBody);
|
||||
bodyData = jsonclient;
|
||||
|
||||
return _dio.request(
|
||||
return _dio.request(
|
||||
_path,
|
||||
queryParameters: queryParams,
|
||||
data: bodyData,
|
||||
options: Options(
|
||||
method: 'patch'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json",
|
||||
method: 'patch'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : 'application/json',
|
||||
),
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
).then((response) {
|
||||
|
||||
).then((response) {
|
||||
final serializer = _serializers.serializerForType(Client);
|
||||
final data = _serializers.deserializeWith<Client>(serializer, response.data is String ? jsonDecode(response.data) : response.data);
|
||||
|
||||
@ -62,6 +66,7 @@ class AnotherFakeApi {
|
||||
statusMessage: response.statusMessage,
|
||||
extra: response.extra,
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,5 +1,4 @@
|
||||
import 'dart:async';
|
||||
import 'dart:io';
|
||||
import 'dart:convert';
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
@ -12,41 +11,42 @@ class DefaultApi {
|
||||
|
||||
DefaultApi(this._dio, this._serializers);
|
||||
|
||||
///
|
||||
///
|
||||
///
|
||||
Future<Response<InlineResponseDefault>>fooGet({ CancelToken cancelToken, Map<String, String> headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async {
|
||||
///
|
||||
///
|
||||
///
|
||||
Future<Response<InlineResponseDefault>>fooGet({
|
||||
CancelToken cancelToken,
|
||||
Map<String, String> headers,
|
||||
ProgressCallback onSendProgress,
|
||||
ProgressCallback onReceiveProgress,
|
||||
}) async {
|
||||
final String _path = '/foo';
|
||||
|
||||
String _path = "/foo";
|
||||
|
||||
Map<String, dynamic> queryParams = {};
|
||||
Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
final Map<String, dynamic> queryParams = {};
|
||||
final Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
dynamic bodyData;
|
||||
|
||||
queryParams.removeWhere((key, value) => value == null);
|
||||
headerParams.removeWhere((key, value) => value == null);
|
||||
|
||||
List<String> contentTypes = [];
|
||||
final List<String> contentTypes = [];
|
||||
|
||||
|
||||
|
||||
return _dio.request(
|
||||
return _dio.request(
|
||||
_path,
|
||||
queryParameters: queryParams,
|
||||
data: bodyData,
|
||||
options: Options(
|
||||
method: 'get'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json",
|
||||
method: 'get'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : 'application/json',
|
||||
),
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
).then((response) {
|
||||
|
||||
).then((response) {
|
||||
final serializer = _serializers.serializerForType(InlineResponseDefault);
|
||||
final data = _serializers.deserializeWith<InlineResponseDefault>(serializer, response.data is String ? jsonDecode(response.data) : response.data);
|
||||
|
||||
@ -59,6 +59,7 @@ class DefaultApi {
|
||||
statusMessage: response.statusMessage,
|
||||
extra: response.extra,
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,4 @@
|
||||
import 'dart:async';
|
||||
import 'dart:io';
|
||||
import 'dart:convert';
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
@ -12,44 +11,56 @@ class FakeClassnameTags123Api {
|
||||
|
||||
FakeClassnameTags123Api(this._dio, this._serializers);
|
||||
|
||||
/// To test class name in snake case
|
||||
///
|
||||
/// To test class name in snake case
|
||||
Future<Response<Client>>testClassname(Client client,{ CancelToken cancelToken, Map<String, String> headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async {
|
||||
/// To test class name in snake case
|
||||
///
|
||||
/// To test class name in snake case
|
||||
Future<Response<Client>>testClassname(
|
||||
Client client, {
|
||||
CancelToken cancelToken,
|
||||
Map<String, String> headers,
|
||||
ProgressCallback onSendProgress,
|
||||
ProgressCallback onReceiveProgress,
|
||||
}) async {
|
||||
final String _path = '/fake_classname_test';
|
||||
|
||||
String _path = "/fake_classname_test";
|
||||
|
||||
Map<String, dynamic> queryParams = {};
|
||||
Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
final Map<String, dynamic> queryParams = {};
|
||||
final Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
dynamic bodyData;
|
||||
|
||||
queryParams.removeWhere((key, value) => value == null);
|
||||
headerParams.removeWhere((key, value) => value == null);
|
||||
|
||||
List<String> contentTypes = ["application/json"];
|
||||
final List<String> contentTypes = [
|
||||
'application/json',
|
||||
];
|
||||
|
||||
final serializedBody = _serializers.serialize(client);
|
||||
final jsonclient = json.encode(serializedBody);
|
||||
bodyData = jsonclient;
|
||||
|
||||
final serializedBody = _serializers.serialize(client);
|
||||
final jsonclient = json.encode(serializedBody);
|
||||
bodyData = jsonclient;
|
||||
|
||||
return _dio.request(
|
||||
return _dio.request(
|
||||
_path,
|
||||
queryParameters: queryParams,
|
||||
data: bodyData,
|
||||
options: Options(
|
||||
method: 'patch'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [ {"type": "apiKey", "name": "api_key_query", "keyName": "api_key_query", "where": "query" }],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json",
|
||||
method: 'patch'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key_query',
|
||||
'keyName': 'api_key_query',
|
||||
'where': 'query',
|
||||
},
|
||||
],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : 'application/json',
|
||||
),
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
).then((response) {
|
||||
|
||||
).then((response) {
|
||||
final serializer = _serializers.serializerForType(Client);
|
||||
final data = _serializers.deserializeWith<Client>(serializer, response.data is String ? jsonDecode(response.data) : response.data);
|
||||
|
||||
@ -62,6 +73,7 @@ class FakeClassnameTags123Api {
|
||||
statusMessage: response.statusMessage,
|
||||
extra: response.extra,
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,5 +1,4 @@
|
||||
import 'dart:async';
|
||||
import 'dart:io';
|
||||
import 'dart:convert';
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
@ -16,116 +15,146 @@ class PetApi {
|
||||
|
||||
PetApi(this._dio, this._serializers);
|
||||
|
||||
/// Add a new pet to the store
|
||||
///
|
||||
///
|
||||
Future<Response>addPet(Pet pet,{ CancelToken cancelToken, Map<String, String> headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async {
|
||||
/// Add a new pet to the store
|
||||
///
|
||||
///
|
||||
Future<Response>addPet(
|
||||
Pet pet, {
|
||||
CancelToken cancelToken,
|
||||
Map<String, String> headers,
|
||||
ProgressCallback onSendProgress,
|
||||
ProgressCallback onReceiveProgress,
|
||||
}) async {
|
||||
final String _path = '/pet';
|
||||
|
||||
String _path = "/pet";
|
||||
|
||||
Map<String, dynamic> queryParams = {};
|
||||
Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
final Map<String, dynamic> queryParams = {};
|
||||
final Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
dynamic bodyData;
|
||||
|
||||
queryParams.removeWhere((key, value) => value == null);
|
||||
headerParams.removeWhere((key, value) => value == null);
|
||||
|
||||
List<String> contentTypes = ["application/json","application/xml"];
|
||||
final List<String> contentTypes = [
|
||||
'application/json',
|
||||
'application/xml',
|
||||
];
|
||||
|
||||
final serializedBody = _serializers.serialize(pet);
|
||||
final jsonpet = json.encode(serializedBody);
|
||||
bodyData = jsonpet;
|
||||
|
||||
final serializedBody = _serializers.serialize(pet);
|
||||
final jsonpet = json.encode(serializedBody);
|
||||
bodyData = jsonpet;
|
||||
|
||||
return _dio.request(
|
||||
return _dio.request(
|
||||
_path,
|
||||
queryParameters: queryParams,
|
||||
data: bodyData,
|
||||
options: Options(
|
||||
method: 'post'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [ {"type": "oauth2", "name": "petstore_auth" }],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json",
|
||||
method: 'post'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [
|
||||
{
|
||||
'type': 'oauth2',
|
||||
'name': 'petstore_auth',
|
||||
},
|
||||
],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : 'application/json',
|
||||
),
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
}
|
||||
/// Deletes a pet
|
||||
///
|
||||
///
|
||||
Future<Response>deletePet(int petId,{ String apiKey,CancelToken cancelToken, Map<String, String> headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async {
|
||||
);
|
||||
}
|
||||
|
||||
String _path = "/pet/{petId}".replaceAll("{" r'petId' "}", petId.toString());
|
||||
/// Deletes a pet
|
||||
///
|
||||
///
|
||||
Future<Response>deletePet(
|
||||
int petId, {
|
||||
String apiKey,
|
||||
CancelToken cancelToken,
|
||||
Map<String, String> headers,
|
||||
ProgressCallback onSendProgress,
|
||||
ProgressCallback onReceiveProgress,
|
||||
}) async {
|
||||
final String _path = '/pet/{petId}'.replaceAll('{' r'petId' '}', petId.toString());
|
||||
|
||||
Map<String, dynamic> queryParams = {};
|
||||
Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
final Map<String, dynamic> queryParams = {};
|
||||
final Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
dynamic bodyData;
|
||||
|
||||
headerParams[r'api_key'] = apiKey;
|
||||
headerParams[r'api_key'] = apiKey;
|
||||
queryParams.removeWhere((key, value) => value == null);
|
||||
headerParams.removeWhere((key, value) => value == null);
|
||||
|
||||
List<String> contentTypes = [];
|
||||
final List<String> contentTypes = [];
|
||||
|
||||
|
||||
|
||||
return _dio.request(
|
||||
return _dio.request(
|
||||
_path,
|
||||
queryParameters: queryParams,
|
||||
data: bodyData,
|
||||
options: Options(
|
||||
method: 'delete'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [ {"type": "oauth2", "name": "petstore_auth" }],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json",
|
||||
method: 'delete'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [
|
||||
{
|
||||
'type': 'oauth2',
|
||||
'name': 'petstore_auth',
|
||||
},
|
||||
],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : 'application/json',
|
||||
),
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
}
|
||||
/// Finds Pets by status
|
||||
///
|
||||
/// Multiple status values can be provided with comma separated strings
|
||||
Future<Response<BuiltList<Pet>>>findPetsByStatus(BuiltList<String> status,{ CancelToken cancelToken, Map<String, String> headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async {
|
||||
);
|
||||
}
|
||||
|
||||
String _path = "/pet/findByStatus";
|
||||
/// Finds Pets by status
|
||||
///
|
||||
/// Multiple status values can be provided with comma separated strings
|
||||
Future<Response<BuiltList<Pet>>>findPetsByStatus(
|
||||
BuiltList<String> status, {
|
||||
CancelToken cancelToken,
|
||||
Map<String, String> headers,
|
||||
ProgressCallback onSendProgress,
|
||||
ProgressCallback onReceiveProgress,
|
||||
}) async {
|
||||
final String _path = '/pet/findByStatus';
|
||||
|
||||
Map<String, dynamic> queryParams = {};
|
||||
Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
final Map<String, dynamic> queryParams = {};
|
||||
final Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
dynamic bodyData;
|
||||
|
||||
queryParams[r'status'] = status;
|
||||
queryParams[r'status'] = status;
|
||||
queryParams.removeWhere((key, value) => value == null);
|
||||
headerParams.removeWhere((key, value) => value == null);
|
||||
|
||||
List<String> contentTypes = [];
|
||||
final List<String> contentTypes = [];
|
||||
|
||||
|
||||
|
||||
return _dio.request(
|
||||
return _dio.request(
|
||||
_path,
|
||||
queryParameters: queryParams,
|
||||
data: bodyData,
|
||||
options: Options(
|
||||
method: 'get'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [ {"type": "oauth2", "name": "petstore_auth" }],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json",
|
||||
method: 'get'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [
|
||||
{
|
||||
'type': 'oauth2',
|
||||
'name': 'petstore_auth',
|
||||
},
|
||||
],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : 'application/json',
|
||||
),
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
).then((response) {
|
||||
|
||||
).then((response) {
|
||||
const collectionType = BuiltList;
|
||||
const type = FullType(collectionType, [FullType(Pet)]);
|
||||
final BuiltList<Pet> data = _serializers.deserialize(response.data is String ? jsonDecode(response.data) : response.data, specifiedType: type);
|
||||
@ -139,44 +168,52 @@ class PetApi {
|
||||
statusMessage: response.statusMessage,
|
||||
extra: response.extra,
|
||||
);
|
||||
});
|
||||
}
|
||||
/// Finds Pets by tags
|
||||
///
|
||||
/// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
Future<Response<BuiltList<Pet>>>findPetsByTags(BuiltList<String> tags,{ CancelToken cancelToken, Map<String, String> headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async {
|
||||
});
|
||||
}
|
||||
|
||||
String _path = "/pet/findByTags";
|
||||
/// Finds Pets by tags
|
||||
///
|
||||
/// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
Future<Response<BuiltList<Pet>>>findPetsByTags(
|
||||
BuiltList<String> tags, {
|
||||
CancelToken cancelToken,
|
||||
Map<String, String> headers,
|
||||
ProgressCallback onSendProgress,
|
||||
ProgressCallback onReceiveProgress,
|
||||
}) async {
|
||||
final String _path = '/pet/findByTags';
|
||||
|
||||
Map<String, dynamic> queryParams = {};
|
||||
Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
final Map<String, dynamic> queryParams = {};
|
||||
final Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
dynamic bodyData;
|
||||
|
||||
queryParams[r'tags'] = tags;
|
||||
queryParams[r'tags'] = tags;
|
||||
queryParams.removeWhere((key, value) => value == null);
|
||||
headerParams.removeWhere((key, value) => value == null);
|
||||
|
||||
List<String> contentTypes = [];
|
||||
final List<String> contentTypes = [];
|
||||
|
||||
|
||||
|
||||
return _dio.request(
|
||||
return _dio.request(
|
||||
_path,
|
||||
queryParameters: queryParams,
|
||||
data: bodyData,
|
||||
options: Options(
|
||||
method: 'get'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [ {"type": "oauth2", "name": "petstore_auth" }],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json",
|
||||
method: 'get'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [
|
||||
{
|
||||
'type': 'oauth2',
|
||||
'name': 'petstore_auth',
|
||||
},
|
||||
],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : 'application/json',
|
||||
),
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
).then((response) {
|
||||
|
||||
).then((response) {
|
||||
const collectionType = BuiltList;
|
||||
const type = FullType(collectionType, [FullType(Pet)]);
|
||||
final BuiltList<Pet> data = _serializers.deserialize(response.data is String ? jsonDecode(response.data) : response.data, specifiedType: type);
|
||||
@ -190,43 +227,53 @@ class PetApi {
|
||||
statusMessage: response.statusMessage,
|
||||
extra: response.extra,
|
||||
);
|
||||
});
|
||||
}
|
||||
/// Find pet by ID
|
||||
///
|
||||
/// Returns a single pet
|
||||
Future<Response<Pet>>getPetById(int petId,{ CancelToken cancelToken, Map<String, String> headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async {
|
||||
});
|
||||
}
|
||||
|
||||
String _path = "/pet/{petId}".replaceAll("{" r'petId' "}", petId.toString());
|
||||
/// Find pet by ID
|
||||
///
|
||||
/// Returns a single pet
|
||||
Future<Response<Pet>>getPetById(
|
||||
int petId, {
|
||||
CancelToken cancelToken,
|
||||
Map<String, String> headers,
|
||||
ProgressCallback onSendProgress,
|
||||
ProgressCallback onReceiveProgress,
|
||||
}) async {
|
||||
final String _path = '/pet/{petId}'.replaceAll('{' r'petId' '}', petId.toString());
|
||||
|
||||
Map<String, dynamic> queryParams = {};
|
||||
Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
final Map<String, dynamic> queryParams = {};
|
||||
final Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
dynamic bodyData;
|
||||
|
||||
queryParams.removeWhere((key, value) => value == null);
|
||||
headerParams.removeWhere((key, value) => value == null);
|
||||
|
||||
List<String> contentTypes = [];
|
||||
final List<String> contentTypes = [];
|
||||
|
||||
|
||||
|
||||
return _dio.request(
|
||||
return _dio.request(
|
||||
_path,
|
||||
queryParameters: queryParams,
|
||||
data: bodyData,
|
||||
options: Options(
|
||||
method: 'get'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [ {"type": "apiKey", "name": "api_key", "keyName": "api_key", "where": "header" }],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json",
|
||||
method: 'get'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'api_key',
|
||||
'where': 'header',
|
||||
},
|
||||
],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : 'application/json',
|
||||
),
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
).then((response) {
|
||||
|
||||
).then((response) {
|
||||
final serializer = _serializers.serializerForType(Pet);
|
||||
final data = _serializers.deserializeWith<Pet>(serializer, response.data is String ? jsonDecode(response.data) : response.data);
|
||||
|
||||
@ -239,100 +286,137 @@ class PetApi {
|
||||
statusMessage: response.statusMessage,
|
||||
extra: response.extra,
|
||||
);
|
||||
});
|
||||
}
|
||||
/// Update an existing pet
|
||||
///
|
||||
///
|
||||
Future<Response>updatePet(Pet pet,{ CancelToken cancelToken, Map<String, String> headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async {
|
||||
});
|
||||
}
|
||||
|
||||
String _path = "/pet";
|
||||
/// Update an existing pet
|
||||
///
|
||||
///
|
||||
Future<Response>updatePet(
|
||||
Pet pet, {
|
||||
CancelToken cancelToken,
|
||||
Map<String, String> headers,
|
||||
ProgressCallback onSendProgress,
|
||||
ProgressCallback onReceiveProgress,
|
||||
}) async {
|
||||
final String _path = '/pet';
|
||||
|
||||
Map<String, dynamic> queryParams = {};
|
||||
Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
final Map<String, dynamic> queryParams = {};
|
||||
final Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
dynamic bodyData;
|
||||
|
||||
queryParams.removeWhere((key, value) => value == null);
|
||||
headerParams.removeWhere((key, value) => value == null);
|
||||
|
||||
List<String> contentTypes = ["application/json","application/xml"];
|
||||
final List<String> contentTypes = [
|
||||
'application/json',
|
||||
'application/xml',
|
||||
];
|
||||
|
||||
final serializedBody = _serializers.serialize(pet);
|
||||
final jsonpet = json.encode(serializedBody);
|
||||
bodyData = jsonpet;
|
||||
|
||||
final serializedBody = _serializers.serialize(pet);
|
||||
final jsonpet = json.encode(serializedBody);
|
||||
bodyData = jsonpet;
|
||||
|
||||
return _dio.request(
|
||||
return _dio.request(
|
||||
_path,
|
||||
queryParameters: queryParams,
|
||||
data: bodyData,
|
||||
options: Options(
|
||||
method: 'put'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [ {"type": "oauth2", "name": "petstore_auth" }],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json",
|
||||
method: 'put'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [
|
||||
{
|
||||
'type': 'oauth2',
|
||||
'name': 'petstore_auth',
|
||||
},
|
||||
],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : 'application/json',
|
||||
),
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
}
|
||||
/// Updates a pet in the store with form data
|
||||
///
|
||||
///
|
||||
Future<Response>updatePetWithForm(int petId,{ String name,String status,CancelToken cancelToken, Map<String, String> headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async {
|
||||
);
|
||||
}
|
||||
|
||||
String _path = "/pet/{petId}".replaceAll("{" r'petId' "}", petId.toString());
|
||||
/// Updates a pet in the store with form data
|
||||
///
|
||||
///
|
||||
Future<Response>updatePetWithForm(
|
||||
int petId, {
|
||||
String name,
|
||||
String status,
|
||||
CancelToken cancelToken,
|
||||
Map<String, String> headers,
|
||||
ProgressCallback onSendProgress,
|
||||
ProgressCallback onReceiveProgress,
|
||||
}) async {
|
||||
final String _path = '/pet/{petId}'.replaceAll('{' r'petId' '}', petId.toString());
|
||||
|
||||
Map<String, dynamic> queryParams = {};
|
||||
Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
final Map<String, dynamic> queryParams = {};
|
||||
final Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
dynamic bodyData;
|
||||
|
||||
queryParams.removeWhere((key, value) => value == null);
|
||||
headerParams.removeWhere((key, value) => value == null);
|
||||
|
||||
List<String> contentTypes = ["application/x-www-form-urlencoded"];
|
||||
final List<String> contentTypes = [
|
||||
'application/x-www-form-urlencoded',
|
||||
];
|
||||
|
||||
final Map<String, dynamic> formData = {};
|
||||
formData['name'] = parameterToString(_serializers, name);
|
||||
formData['status'] = parameterToString(_serializers, status);
|
||||
bodyData = formData;
|
||||
|
||||
|
||||
return _dio.request(
|
||||
return _dio.request(
|
||||
_path,
|
||||
queryParameters: queryParams,
|
||||
data: bodyData,
|
||||
options: Options(
|
||||
method: 'post'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [ {"type": "oauth2", "name": "petstore_auth" }],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json",
|
||||
method: 'post'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [
|
||||
{
|
||||
'type': 'oauth2',
|
||||
'name': 'petstore_auth',
|
||||
},
|
||||
],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : 'application/json',
|
||||
),
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
}
|
||||
/// uploads an image
|
||||
///
|
||||
///
|
||||
Future<Response<ApiResponse>>uploadFile(int petId,{ String additionalMetadata,Uint8List file,CancelToken cancelToken, Map<String, String> headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async {
|
||||
);
|
||||
}
|
||||
|
||||
String _path = "/pet/{petId}/uploadImage".replaceAll("{" r'petId' "}", petId.toString());
|
||||
/// uploads an image
|
||||
///
|
||||
///
|
||||
Future<Response<ApiResponse>>uploadFile(
|
||||
int petId, {
|
||||
String additionalMetadata,
|
||||
Uint8List file,
|
||||
CancelToken cancelToken,
|
||||
Map<String, String> headers,
|
||||
ProgressCallback onSendProgress,
|
||||
ProgressCallback onReceiveProgress,
|
||||
}) async {
|
||||
final String _path = '/pet/{petId}/uploadImage'.replaceAll('{' r'petId' '}', petId.toString());
|
||||
|
||||
Map<String, dynamic> queryParams = {};
|
||||
Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
final Map<String, dynamic> queryParams = {};
|
||||
final Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
dynamic bodyData;
|
||||
|
||||
queryParams.removeWhere((key, value) => value == null);
|
||||
headerParams.removeWhere((key, value) => value == null);
|
||||
|
||||
List<String> contentTypes = ["multipart/form-data"];
|
||||
final List<String> contentTypes = [
|
||||
'multipart/form-data',
|
||||
];
|
||||
|
||||
final Map<String, dynamic> formData = {};
|
||||
if (additionalMetadata != null) {
|
||||
@ -343,24 +427,27 @@ class PetApi {
|
||||
}
|
||||
bodyData = FormData.fromMap(formData);
|
||||
|
||||
|
||||
return _dio.request(
|
||||
return _dio.request(
|
||||
_path,
|
||||
queryParameters: queryParams,
|
||||
data: bodyData,
|
||||
options: Options(
|
||||
method: 'post'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [ {"type": "oauth2", "name": "petstore_auth" }],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json",
|
||||
method: 'post'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [
|
||||
{
|
||||
'type': 'oauth2',
|
||||
'name': 'petstore_auth',
|
||||
},
|
||||
],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : 'application/json',
|
||||
),
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
).then((response) {
|
||||
|
||||
).then((response) {
|
||||
final serializer = _serializers.serializerForType(ApiResponse);
|
||||
final data = _serializers.deserializeWith<ApiResponse>(serializer, response.data is String ? jsonDecode(response.data) : response.data);
|
||||
|
||||
@ -373,23 +460,33 @@ class PetApi {
|
||||
statusMessage: response.statusMessage,
|
||||
extra: response.extra,
|
||||
);
|
||||
});
|
||||
}
|
||||
/// uploads an image (required)
|
||||
///
|
||||
///
|
||||
Future<Response<ApiResponse>>uploadFileWithRequiredFile(int petId,Uint8List requiredFile,{ String additionalMetadata,CancelToken cancelToken, Map<String, String> headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async {
|
||||
});
|
||||
}
|
||||
|
||||
String _path = "/fake/{petId}/uploadImageWithRequiredFile".replaceAll("{" r'petId' "}", petId.toString());
|
||||
/// uploads an image (required)
|
||||
///
|
||||
///
|
||||
Future<Response<ApiResponse>>uploadFileWithRequiredFile(
|
||||
int petId,
|
||||
Uint8List requiredFile, {
|
||||
String additionalMetadata,
|
||||
CancelToken cancelToken,
|
||||
Map<String, String> headers,
|
||||
ProgressCallback onSendProgress,
|
||||
ProgressCallback onReceiveProgress,
|
||||
}) async {
|
||||
final String _path = '/fake/{petId}/uploadImageWithRequiredFile'.replaceAll('{' r'petId' '}', petId.toString());
|
||||
|
||||
Map<String, dynamic> queryParams = {};
|
||||
Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
final Map<String, dynamic> queryParams = {};
|
||||
final Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
dynamic bodyData;
|
||||
|
||||
queryParams.removeWhere((key, value) => value == null);
|
||||
headerParams.removeWhere((key, value) => value == null);
|
||||
|
||||
List<String> contentTypes = ["multipart/form-data"];
|
||||
final List<String> contentTypes = [
|
||||
'multipart/form-data',
|
||||
];
|
||||
|
||||
final Map<String, dynamic> formData = {};
|
||||
if (additionalMetadata != null) {
|
||||
@ -400,24 +497,27 @@ class PetApi {
|
||||
}
|
||||
bodyData = FormData.fromMap(formData);
|
||||
|
||||
|
||||
return _dio.request(
|
||||
return _dio.request(
|
||||
_path,
|
||||
queryParameters: queryParams,
|
||||
data: bodyData,
|
||||
options: Options(
|
||||
method: 'post'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [ {"type": "oauth2", "name": "petstore_auth" }],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json",
|
||||
method: 'post'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [
|
||||
{
|
||||
'type': 'oauth2',
|
||||
'name': 'petstore_auth',
|
||||
},
|
||||
],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : 'application/json',
|
||||
),
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
).then((response) {
|
||||
|
||||
).then((response) {
|
||||
final serializer = _serializers.serializerForType(ApiResponse);
|
||||
final data = _serializers.deserializeWith<ApiResponse>(serializer, response.data is String ? jsonDecode(response.data) : response.data);
|
||||
|
||||
@ -430,6 +530,7 @@ class PetApi {
|
||||
statusMessage: response.statusMessage,
|
||||
extra: response.extra,
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,5 +1,4 @@
|
||||
import 'dart:async';
|
||||
import 'dart:io';
|
||||
import 'dart:convert';
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
@ -13,76 +12,88 @@ class StoreApi {
|
||||
|
||||
StoreApi(this._dio, this._serializers);
|
||||
|
||||
/// Delete purchase order by ID
|
||||
///
|
||||
/// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
Future<Response>deleteOrder(String orderId,{ CancelToken cancelToken, Map<String, String> headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async {
|
||||
/// Delete purchase order by ID
|
||||
///
|
||||
/// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
Future<Response>deleteOrder(
|
||||
String orderId, {
|
||||
CancelToken cancelToken,
|
||||
Map<String, String> headers,
|
||||
ProgressCallback onSendProgress,
|
||||
ProgressCallback onReceiveProgress,
|
||||
}) async {
|
||||
final String _path = '/store/order/{order_id}'.replaceAll('{' r'order_id' '}', orderId.toString());
|
||||
|
||||
String _path = "/store/order/{order_id}".replaceAll("{" r'order_id' "}", orderId.toString());
|
||||
|
||||
Map<String, dynamic> queryParams = {};
|
||||
Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
final Map<String, dynamic> queryParams = {};
|
||||
final Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
dynamic bodyData;
|
||||
|
||||
queryParams.removeWhere((key, value) => value == null);
|
||||
headerParams.removeWhere((key, value) => value == null);
|
||||
|
||||
List<String> contentTypes = [];
|
||||
final List<String> contentTypes = [];
|
||||
|
||||
|
||||
|
||||
return _dio.request(
|
||||
return _dio.request(
|
||||
_path,
|
||||
queryParameters: queryParams,
|
||||
data: bodyData,
|
||||
options: Options(
|
||||
method: 'delete'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json",
|
||||
method: 'delete'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : 'application/json',
|
||||
),
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
}
|
||||
/// Returns pet inventories by status
|
||||
///
|
||||
/// Returns a map of status codes to quantities
|
||||
Future<Response<BuiltMap<String, int>>>getInventory({ CancelToken cancelToken, Map<String, String> headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async {
|
||||
);
|
||||
}
|
||||
|
||||
String _path = "/store/inventory";
|
||||
/// Returns pet inventories by status
|
||||
///
|
||||
/// Returns a map of status codes to quantities
|
||||
Future<Response<BuiltMap<String, int>>>getInventory({
|
||||
CancelToken cancelToken,
|
||||
Map<String, String> headers,
|
||||
ProgressCallback onSendProgress,
|
||||
ProgressCallback onReceiveProgress,
|
||||
}) async {
|
||||
final String _path = '/store/inventory';
|
||||
|
||||
Map<String, dynamic> queryParams = {};
|
||||
Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
final Map<String, dynamic> queryParams = {};
|
||||
final Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
dynamic bodyData;
|
||||
|
||||
queryParams.removeWhere((key, value) => value == null);
|
||||
headerParams.removeWhere((key, value) => value == null);
|
||||
|
||||
List<String> contentTypes = [];
|
||||
final List<String> contentTypes = [];
|
||||
|
||||
|
||||
|
||||
return _dio.request(
|
||||
return _dio.request(
|
||||
_path,
|
||||
queryParameters: queryParams,
|
||||
data: bodyData,
|
||||
options: Options(
|
||||
method: 'get'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [ {"type": "apiKey", "name": "api_key", "keyName": "api_key", "where": "header" }],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json",
|
||||
method: 'get'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'api_key',
|
||||
'where': 'header',
|
||||
},
|
||||
],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : 'application/json',
|
||||
),
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
).then((response) {
|
||||
|
||||
).then((response) {
|
||||
const collectionType = BuiltMap;
|
||||
const type = FullType(collectionType, [FullType(String), FullType(int)]);
|
||||
final BuiltMap<String, int> data = _serializers.deserialize(response.data is String ? jsonDecode(response.data) : response.data, specifiedType: type);
|
||||
@ -96,43 +107,46 @@ class StoreApi {
|
||||
statusMessage: response.statusMessage,
|
||||
extra: response.extra,
|
||||
);
|
||||
});
|
||||
}
|
||||
/// Find purchase order by ID
|
||||
///
|
||||
/// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
Future<Response<Order>>getOrderById(int orderId,{ CancelToken cancelToken, Map<String, String> headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async {
|
||||
});
|
||||
}
|
||||
|
||||
String _path = "/store/order/{order_id}".replaceAll("{" r'order_id' "}", orderId.toString());
|
||||
/// Find purchase order by ID
|
||||
///
|
||||
/// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
Future<Response<Order>>getOrderById(
|
||||
int orderId, {
|
||||
CancelToken cancelToken,
|
||||
Map<String, String> headers,
|
||||
ProgressCallback onSendProgress,
|
||||
ProgressCallback onReceiveProgress,
|
||||
}) async {
|
||||
final String _path = '/store/order/{order_id}'.replaceAll('{' r'order_id' '}', orderId.toString());
|
||||
|
||||
Map<String, dynamic> queryParams = {};
|
||||
Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
final Map<String, dynamic> queryParams = {};
|
||||
final Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
dynamic bodyData;
|
||||
|
||||
queryParams.removeWhere((key, value) => value == null);
|
||||
headerParams.removeWhere((key, value) => value == null);
|
||||
|
||||
List<String> contentTypes = [];
|
||||
final List<String> contentTypes = [];
|
||||
|
||||
|
||||
|
||||
return _dio.request(
|
||||
return _dio.request(
|
||||
_path,
|
||||
queryParameters: queryParams,
|
||||
data: bodyData,
|
||||
options: Options(
|
||||
method: 'get'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json",
|
||||
method: 'get'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : 'application/json',
|
||||
),
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
).then((response) {
|
||||
|
||||
).then((response) {
|
||||
final serializer = _serializers.serializerForType(Order);
|
||||
final data = _serializers.deserializeWith<Order>(serializer, response.data is String ? jsonDecode(response.data) : response.data);
|
||||
|
||||
@ -145,46 +159,52 @@ class StoreApi {
|
||||
statusMessage: response.statusMessage,
|
||||
extra: response.extra,
|
||||
);
|
||||
});
|
||||
}
|
||||
/// Place an order for a pet
|
||||
///
|
||||
///
|
||||
Future<Response<Order>>placeOrder(Order order,{ CancelToken cancelToken, Map<String, String> headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async {
|
||||
});
|
||||
}
|
||||
|
||||
String _path = "/store/order";
|
||||
/// Place an order for a pet
|
||||
///
|
||||
///
|
||||
Future<Response<Order>>placeOrder(
|
||||
Order order, {
|
||||
CancelToken cancelToken,
|
||||
Map<String, String> headers,
|
||||
ProgressCallback onSendProgress,
|
||||
ProgressCallback onReceiveProgress,
|
||||
}) async {
|
||||
final String _path = '/store/order';
|
||||
|
||||
Map<String, dynamic> queryParams = {};
|
||||
Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
final Map<String, dynamic> queryParams = {};
|
||||
final Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
dynamic bodyData;
|
||||
|
||||
queryParams.removeWhere((key, value) => value == null);
|
||||
headerParams.removeWhere((key, value) => value == null);
|
||||
|
||||
List<String> contentTypes = ["application/json"];
|
||||
final List<String> contentTypes = [
|
||||
'application/json',
|
||||
];
|
||||
|
||||
final serializedBody = _serializers.serialize(order);
|
||||
final jsonorder = json.encode(serializedBody);
|
||||
bodyData = jsonorder;
|
||||
|
||||
final serializedBody = _serializers.serialize(order);
|
||||
final jsonorder = json.encode(serializedBody);
|
||||
bodyData = jsonorder;
|
||||
|
||||
return _dio.request(
|
||||
return _dio.request(
|
||||
_path,
|
||||
queryParameters: queryParams,
|
||||
data: bodyData,
|
||||
options: Options(
|
||||
method: 'post'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json",
|
||||
method: 'post'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : 'application/json',
|
||||
),
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
).then((response) {
|
||||
|
||||
).then((response) {
|
||||
final serializer = _serializers.serializerForType(Order);
|
||||
final data = _serializers.deserializeWith<Order>(serializer, response.data is String ? jsonDecode(response.data) : response.data);
|
||||
|
||||
@ -197,6 +217,7 @@ class StoreApi {
|
||||
statusMessage: response.statusMessage,
|
||||
extra: response.extra,
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,5 +1,4 @@
|
||||
import 'dart:async';
|
||||
import 'dart:io';
|
||||
import 'dart:convert';
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
@ -13,192 +12,219 @@ class UserApi {
|
||||
|
||||
UserApi(this._dio, this._serializers);
|
||||
|
||||
/// Create user
|
||||
///
|
||||
/// This can only be done by the logged in user.
|
||||
Future<Response>createUser(User user,{ CancelToken cancelToken, Map<String, String> headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async {
|
||||
/// Create user
|
||||
///
|
||||
/// This can only be done by the logged in user.
|
||||
Future<Response>createUser(
|
||||
User user, {
|
||||
CancelToken cancelToken,
|
||||
Map<String, String> headers,
|
||||
ProgressCallback onSendProgress,
|
||||
ProgressCallback onReceiveProgress,
|
||||
}) async {
|
||||
final String _path = '/user';
|
||||
|
||||
String _path = "/user";
|
||||
|
||||
Map<String, dynamic> queryParams = {};
|
||||
Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
final Map<String, dynamic> queryParams = {};
|
||||
final Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
dynamic bodyData;
|
||||
|
||||
queryParams.removeWhere((key, value) => value == null);
|
||||
headerParams.removeWhere((key, value) => value == null);
|
||||
|
||||
List<String> contentTypes = ["application/json"];
|
||||
final List<String> contentTypes = [
|
||||
'application/json',
|
||||
];
|
||||
|
||||
final serializedBody = _serializers.serialize(user);
|
||||
final jsonuser = json.encode(serializedBody);
|
||||
bodyData = jsonuser;
|
||||
|
||||
final serializedBody = _serializers.serialize(user);
|
||||
final jsonuser = json.encode(serializedBody);
|
||||
bodyData = jsonuser;
|
||||
|
||||
return _dio.request(
|
||||
return _dio.request(
|
||||
_path,
|
||||
queryParameters: queryParams,
|
||||
data: bodyData,
|
||||
options: Options(
|
||||
method: 'post'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json",
|
||||
method: 'post'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : 'application/json',
|
||||
),
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
}
|
||||
/// Creates list of users with given input array
|
||||
///
|
||||
///
|
||||
Future<Response>createUsersWithArrayInput(BuiltList<User> user,{ CancelToken cancelToken, Map<String, String> headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async {
|
||||
);
|
||||
}
|
||||
|
||||
String _path = "/user/createWithArray";
|
||||
/// Creates list of users with given input array
|
||||
///
|
||||
///
|
||||
Future<Response>createUsersWithArrayInput(
|
||||
BuiltList<User> user, {
|
||||
CancelToken cancelToken,
|
||||
Map<String, String> headers,
|
||||
ProgressCallback onSendProgress,
|
||||
ProgressCallback onReceiveProgress,
|
||||
}) async {
|
||||
final String _path = '/user/createWithArray';
|
||||
|
||||
Map<String, dynamic> queryParams = {};
|
||||
Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
final Map<String, dynamic> queryParams = {};
|
||||
final Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
dynamic bodyData;
|
||||
|
||||
queryParams.removeWhere((key, value) => value == null);
|
||||
headerParams.removeWhere((key, value) => value == null);
|
||||
|
||||
List<String> contentTypes = ["application/json"];
|
||||
final List<String> contentTypes = [
|
||||
'application/json',
|
||||
];
|
||||
|
||||
const type = FullType(BuiltList, [FullType(User)]);
|
||||
final serializedBody = _serializers.serialize(user, specifiedType: type);
|
||||
final jsonuser = json.encode(serializedBody);
|
||||
bodyData = jsonuser;
|
||||
|
||||
const type = FullType(BuiltList, [FullType(User)]);
|
||||
final serializedBody = _serializers.serialize(user, specifiedType: type);
|
||||
final jsonuser = json.encode(serializedBody);
|
||||
bodyData = jsonuser;
|
||||
|
||||
return _dio.request(
|
||||
return _dio.request(
|
||||
_path,
|
||||
queryParameters: queryParams,
|
||||
data: bodyData,
|
||||
options: Options(
|
||||
method: 'post'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json",
|
||||
method: 'post'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : 'application/json',
|
||||
),
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
}
|
||||
/// Creates list of users with given input array
|
||||
///
|
||||
///
|
||||
Future<Response>createUsersWithListInput(BuiltList<User> user,{ CancelToken cancelToken, Map<String, String> headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async {
|
||||
);
|
||||
}
|
||||
|
||||
String _path = "/user/createWithList";
|
||||
/// Creates list of users with given input array
|
||||
///
|
||||
///
|
||||
Future<Response>createUsersWithListInput(
|
||||
BuiltList<User> user, {
|
||||
CancelToken cancelToken,
|
||||
Map<String, String> headers,
|
||||
ProgressCallback onSendProgress,
|
||||
ProgressCallback onReceiveProgress,
|
||||
}) async {
|
||||
final String _path = '/user/createWithList';
|
||||
|
||||
Map<String, dynamic> queryParams = {};
|
||||
Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
final Map<String, dynamic> queryParams = {};
|
||||
final Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
dynamic bodyData;
|
||||
|
||||
queryParams.removeWhere((key, value) => value == null);
|
||||
headerParams.removeWhere((key, value) => value == null);
|
||||
|
||||
List<String> contentTypes = ["application/json"];
|
||||
final List<String> contentTypes = [
|
||||
'application/json',
|
||||
];
|
||||
|
||||
const type = FullType(BuiltList, [FullType(User)]);
|
||||
final serializedBody = _serializers.serialize(user, specifiedType: type);
|
||||
final jsonuser = json.encode(serializedBody);
|
||||
bodyData = jsonuser;
|
||||
|
||||
const type = FullType(BuiltList, [FullType(User)]);
|
||||
final serializedBody = _serializers.serialize(user, specifiedType: type);
|
||||
final jsonuser = json.encode(serializedBody);
|
||||
bodyData = jsonuser;
|
||||
|
||||
return _dio.request(
|
||||
return _dio.request(
|
||||
_path,
|
||||
queryParameters: queryParams,
|
||||
data: bodyData,
|
||||
options: Options(
|
||||
method: 'post'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json",
|
||||
method: 'post'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : 'application/json',
|
||||
),
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
}
|
||||
/// Delete user
|
||||
///
|
||||
/// This can only be done by the logged in user.
|
||||
Future<Response>deleteUser(String username,{ CancelToken cancelToken, Map<String, String> headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async {
|
||||
);
|
||||
}
|
||||
|
||||
String _path = "/user/{username}".replaceAll("{" r'username' "}", username.toString());
|
||||
/// Delete user
|
||||
///
|
||||
/// This can only be done by the logged in user.
|
||||
Future<Response>deleteUser(
|
||||
String username, {
|
||||
CancelToken cancelToken,
|
||||
Map<String, String> headers,
|
||||
ProgressCallback onSendProgress,
|
||||
ProgressCallback onReceiveProgress,
|
||||
}) async {
|
||||
final String _path = '/user/{username}'.replaceAll('{' r'username' '}', username.toString());
|
||||
|
||||
Map<String, dynamic> queryParams = {};
|
||||
Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
final Map<String, dynamic> queryParams = {};
|
||||
final Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
dynamic bodyData;
|
||||
|
||||
queryParams.removeWhere((key, value) => value == null);
|
||||
headerParams.removeWhere((key, value) => value == null);
|
||||
|
||||
List<String> contentTypes = [];
|
||||
final List<String> contentTypes = [];
|
||||
|
||||
|
||||
|
||||
return _dio.request(
|
||||
return _dio.request(
|
||||
_path,
|
||||
queryParameters: queryParams,
|
||||
data: bodyData,
|
||||
options: Options(
|
||||
method: 'delete'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json",
|
||||
method: 'delete'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : 'application/json',
|
||||
),
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
}
|
||||
/// Get user by user name
|
||||
///
|
||||
///
|
||||
Future<Response<User>>getUserByName(String username,{ CancelToken cancelToken, Map<String, String> headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async {
|
||||
);
|
||||
}
|
||||
|
||||
String _path = "/user/{username}".replaceAll("{" r'username' "}", username.toString());
|
||||
/// Get user by user name
|
||||
///
|
||||
///
|
||||
Future<Response<User>>getUserByName(
|
||||
String username, {
|
||||
CancelToken cancelToken,
|
||||
Map<String, String> headers,
|
||||
ProgressCallback onSendProgress,
|
||||
ProgressCallback onReceiveProgress,
|
||||
}) async {
|
||||
final String _path = '/user/{username}'.replaceAll('{' r'username' '}', username.toString());
|
||||
|
||||
Map<String, dynamic> queryParams = {};
|
||||
Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
final Map<String, dynamic> queryParams = {};
|
||||
final Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
dynamic bodyData;
|
||||
|
||||
queryParams.removeWhere((key, value) => value == null);
|
||||
headerParams.removeWhere((key, value) => value == null);
|
||||
|
||||
List<String> contentTypes = [];
|
||||
final List<String> contentTypes = [];
|
||||
|
||||
|
||||
|
||||
return _dio.request(
|
||||
return _dio.request(
|
||||
_path,
|
||||
queryParameters: queryParams,
|
||||
data: bodyData,
|
||||
options: Options(
|
||||
method: 'get'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json",
|
||||
method: 'get'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : 'application/json',
|
||||
),
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
).then((response) {
|
||||
|
||||
).then((response) {
|
||||
final serializer = _serializers.serializerForType(User);
|
||||
final data = _serializers.deserializeWith<User>(serializer, response.data is String ? jsonDecode(response.data) : response.data);
|
||||
|
||||
@ -211,45 +237,49 @@ class UserApi {
|
||||
statusMessage: response.statusMessage,
|
||||
extra: response.extra,
|
||||
);
|
||||
});
|
||||
}
|
||||
/// Logs user into the system
|
||||
///
|
||||
///
|
||||
Future<Response<String>>loginUser(String username,String password,{ CancelToken cancelToken, Map<String, String> headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async {
|
||||
});
|
||||
}
|
||||
|
||||
String _path = "/user/login";
|
||||
/// Logs user into the system
|
||||
///
|
||||
///
|
||||
Future<Response<String>>loginUser(
|
||||
String username,
|
||||
String password, {
|
||||
CancelToken cancelToken,
|
||||
Map<String, String> headers,
|
||||
ProgressCallback onSendProgress,
|
||||
ProgressCallback onReceiveProgress,
|
||||
}) async {
|
||||
final String _path = '/user/login';
|
||||
|
||||
Map<String, dynamic> queryParams = {};
|
||||
Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
final Map<String, dynamic> queryParams = {};
|
||||
final Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
dynamic bodyData;
|
||||
|
||||
queryParams[r'username'] = username;
|
||||
queryParams[r'password'] = password;
|
||||
queryParams[r'username'] = username;
|
||||
queryParams[r'password'] = password;
|
||||
queryParams.removeWhere((key, value) => value == null);
|
||||
headerParams.removeWhere((key, value) => value == null);
|
||||
|
||||
List<String> contentTypes = [];
|
||||
final List<String> contentTypes = [];
|
||||
|
||||
|
||||
|
||||
return _dio.request(
|
||||
return _dio.request(
|
||||
_path,
|
||||
queryParameters: queryParams,
|
||||
data: bodyData,
|
||||
options: Options(
|
||||
method: 'get'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json",
|
||||
method: 'get'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : 'application/json',
|
||||
),
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
).then((response) {
|
||||
|
||||
).then((response) {
|
||||
final data = response.data as String;
|
||||
|
||||
return Response<String>(
|
||||
@ -261,79 +291,91 @@ class UserApi {
|
||||
statusMessage: response.statusMessage,
|
||||
extra: response.extra,
|
||||
);
|
||||
});
|
||||
}
|
||||
/// Logs out current logged in user session
|
||||
///
|
||||
///
|
||||
Future<Response>logoutUser({ CancelToken cancelToken, Map<String, String> headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async {
|
||||
});
|
||||
}
|
||||
|
||||
String _path = "/user/logout";
|
||||
/// Logs out current logged in user session
|
||||
///
|
||||
///
|
||||
Future<Response>logoutUser({
|
||||
CancelToken cancelToken,
|
||||
Map<String, String> headers,
|
||||
ProgressCallback onSendProgress,
|
||||
ProgressCallback onReceiveProgress,
|
||||
}) async {
|
||||
final String _path = '/user/logout';
|
||||
|
||||
Map<String, dynamic> queryParams = {};
|
||||
Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
final Map<String, dynamic> queryParams = {};
|
||||
final Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
dynamic bodyData;
|
||||
|
||||
queryParams.removeWhere((key, value) => value == null);
|
||||
headerParams.removeWhere((key, value) => value == null);
|
||||
|
||||
List<String> contentTypes = [];
|
||||
final List<String> contentTypes = [];
|
||||
|
||||
|
||||
|
||||
return _dio.request(
|
||||
return _dio.request(
|
||||
_path,
|
||||
queryParameters: queryParams,
|
||||
data: bodyData,
|
||||
options: Options(
|
||||
method: 'get'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json",
|
||||
method: 'get'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : 'application/json',
|
||||
),
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
}
|
||||
/// Updated user
|
||||
///
|
||||
/// This can only be done by the logged in user.
|
||||
Future<Response>updateUser(String username,User user,{ CancelToken cancelToken, Map<String, String> headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async {
|
||||
);
|
||||
}
|
||||
|
||||
String _path = "/user/{username}".replaceAll("{" r'username' "}", username.toString());
|
||||
/// Updated user
|
||||
///
|
||||
/// This can only be done by the logged in user.
|
||||
Future<Response>updateUser(
|
||||
String username,
|
||||
User user, {
|
||||
CancelToken cancelToken,
|
||||
Map<String, String> headers,
|
||||
ProgressCallback onSendProgress,
|
||||
ProgressCallback onReceiveProgress,
|
||||
}) async {
|
||||
final String _path = '/user/{username}'.replaceAll('{' r'username' '}', username.toString());
|
||||
|
||||
Map<String, dynamic> queryParams = {};
|
||||
Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
final Map<String, dynamic> queryParams = {};
|
||||
final Map<String, String> headerParams = Map.from(headers ?? {});
|
||||
dynamic bodyData;
|
||||
|
||||
queryParams.removeWhere((key, value) => value == null);
|
||||
headerParams.removeWhere((key, value) => value == null);
|
||||
|
||||
List<String> contentTypes = ["application/json"];
|
||||
final List<String> contentTypes = [
|
||||
'application/json',
|
||||
];
|
||||
|
||||
final serializedBody = _serializers.serialize(user);
|
||||
final jsonuser = json.encode(serializedBody);
|
||||
bodyData = jsonuser;
|
||||
|
||||
final serializedBody = _serializers.serialize(user);
|
||||
final jsonuser = json.encode(serializedBody);
|
||||
bodyData = jsonuser;
|
||||
|
||||
return _dio.request(
|
||||
return _dio.request(
|
||||
_path,
|
||||
queryParameters: queryParams,
|
||||
data: bodyData,
|
||||
options: Options(
|
||||
method: 'put'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json",
|
||||
method: 'put'.toUpperCase(),
|
||||
headers: headerParams,
|
||||
extra: {
|
||||
'secure': [],
|
||||
},
|
||||
contentType: contentTypes.isNotEmpty ? contentTypes[0] : 'application/json',
|
||||
),
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -6,11 +6,10 @@ part 'additional_properties_class.g.dart';
|
||||
|
||||
abstract class AdditionalPropertiesClass implements Built<AdditionalPropertiesClass, AdditionalPropertiesClassBuilder> {
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'map_property')
|
||||
BuiltMap<String, String> get mapProperty;
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'map_of_map_property')
|
||||
BuiltMap<String, BuiltMap<String, String>> get mapOfMapProperty;
|
||||
|
@ -5,11 +5,10 @@ part 'animal.g.dart';
|
||||
|
||||
abstract class Animal implements Built<Animal, AnimalBuilder> {
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'className')
|
||||
String get className;
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'color')
|
||||
String get color;
|
||||
|
@ -5,15 +5,14 @@ part 'api_response.g.dart';
|
||||
|
||||
abstract class ApiResponse implements Built<ApiResponse, ApiResponseBuilder> {
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'code')
|
||||
int get code;
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'type')
|
||||
String get type;
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'message')
|
||||
String get message;
|
||||
|
@ -6,7 +6,6 @@ part 'array_of_array_of_number_only.g.dart';
|
||||
|
||||
abstract class ArrayOfArrayOfNumberOnly implements Built<ArrayOfArrayOfNumberOnly, ArrayOfArrayOfNumberOnlyBuilder> {
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'ArrayArrayNumber')
|
||||
BuiltList<BuiltList<num>> get arrayArrayNumber;
|
||||
|
@ -6,7 +6,6 @@ part 'array_of_number_only.g.dart';
|
||||
|
||||
abstract class ArrayOfNumberOnly implements Built<ArrayOfNumberOnly, ArrayOfNumberOnlyBuilder> {
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'ArrayNumber')
|
||||
BuiltList<num> get arrayNumber;
|
||||
|
@ -7,15 +7,14 @@ part 'array_test.g.dart';
|
||||
|
||||
abstract class ArrayTest implements Built<ArrayTest, ArrayTestBuilder> {
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'array_of_string')
|
||||
BuiltList<String> get arrayOfString;
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'array_array_of_integer')
|
||||
BuiltList<BuiltList<int>> get arrayArrayOfInteger;
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'array_array_of_model')
|
||||
BuiltList<BuiltList<ReadOnlyFirst>> get arrayArrayOfModel;
|
||||
|
@ -5,27 +5,27 @@ part 'capitalization.g.dart';
|
||||
|
||||
abstract class Capitalization implements Built<Capitalization, CapitalizationBuilder> {
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'smallCamel')
|
||||
String get smallCamel;
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'CapitalCamel')
|
||||
String get capitalCamel;
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'small_Snake')
|
||||
String get smallSnake;
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'Capital_Snake')
|
||||
String get capitalSnake;
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'SCA_ETH_Flow_Points')
|
||||
String get sCAETHFlowPoints;
|
||||
/* Name of the pet */
|
||||
|
||||
/// Name of the pet
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'ATT_NAME')
|
||||
String get ATT_NAME;
|
||||
|
@ -7,15 +7,14 @@ part 'cat.g.dart';
|
||||
|
||||
abstract class Cat implements Built<Cat, CatBuilder> {
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'className')
|
||||
String get className;
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'color')
|
||||
String get color;
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'declawed')
|
||||
bool get declawed;
|
||||
|
@ -5,7 +5,6 @@ part 'cat_all_of.g.dart';
|
||||
|
||||
abstract class CatAllOf implements Built<CatAllOf, CatAllOfBuilder> {
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'declawed')
|
||||
bool get declawed;
|
||||
|
@ -5,11 +5,10 @@ part 'category.g.dart';
|
||||
|
||||
abstract class Category implements Built<Category, CategoryBuilder> {
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'id')
|
||||
int get id;
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'name')
|
||||
String get name;
|
||||
|
@ -5,7 +5,6 @@ part 'class_model.g.dart';
|
||||
|
||||
abstract class ClassModel implements Built<ClassModel, ClassModelBuilder> {
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'_class')
|
||||
String get class_;
|
||||
|
@ -5,7 +5,6 @@ part 'client.g.dart';
|
||||
|
||||
abstract class Client implements Built<Client, ClientBuilder> {
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'client')
|
||||
String get client;
|
||||
|
@ -7,15 +7,14 @@ part 'dog.g.dart';
|
||||
|
||||
abstract class Dog implements Built<Dog, DogBuilder> {
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'className')
|
||||
String get className;
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'color')
|
||||
String get color;
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'breed')
|
||||
String get breed;
|
||||
|
@ -5,7 +5,6 @@ part 'dog_all_of.g.dart';
|
||||
|
||||
abstract class DogAllOf implements Built<DogAllOf, DogAllOfBuilder> {
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'breed')
|
||||
String get breed;
|
||||
|
@ -6,12 +6,11 @@ part 'enum_arrays.g.dart';
|
||||
|
||||
abstract class EnumArrays implements Built<EnumArrays, EnumArraysBuilder> {
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'just_symbol')
|
||||
EnumArraysJustSymbolEnum get justSymbol;
|
||||
// enum justSymbolEnum { >=, $, };
|
||||
|
||||
// enum justSymbolEnum { >=, $, };
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'array_enum')
|
||||
BuiltList<EnumArraysArrayEnumEnum> get arrayEnum;
|
||||
|
@ -10,42 +10,41 @@ part 'enum_test.g.dart';
|
||||
|
||||
abstract class EnumTest implements Built<EnumTest, EnumTestBuilder> {
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'enum_string')
|
||||
EnumTestEnumStringEnum get enumString;
|
||||
// enum enumStringEnum { UPPER, lower, , };
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'enum_string_required')
|
||||
EnumTestEnumStringRequiredEnum get enumStringRequired;
|
||||
// enum enumStringRequiredEnum { UPPER, lower, , };
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'enum_integer')
|
||||
EnumTestEnumIntegerEnum get enumInteger;
|
||||
// enum enumIntegerEnum { 1, -1, };
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'enum_number')
|
||||
EnumTestEnumNumberEnum get enumNumber;
|
||||
// enum enumNumberEnum { 1.1, -1.2, };
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'outerEnum')
|
||||
OuterEnum get outerEnum;
|
||||
// enum outerEnumEnum { placed, approved, delivered, };
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'outerEnumInteger')
|
||||
OuterEnumInteger get outerEnumInteger;
|
||||
// enum outerEnumIntegerEnum { 0, 1, 2, };
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'outerEnumDefaultValue')
|
||||
OuterEnumDefaultValue get outerEnumDefaultValue;
|
||||
// enum outerEnumDefaultValueEnum { placed, approved, delivered, };
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'outerEnumIntegerDefaultValue')
|
||||
OuterEnumIntegerDefaultValue get outerEnumIntegerDefaultValue;
|
||||
|
@ -5,7 +5,7 @@ part 'file.g.dart';
|
||||
|
||||
abstract class File implements Built<File, FileBuilder> {
|
||||
|
||||
/* Test capitalization */
|
||||
/// Test capitalization
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'sourceURI')
|
||||
String get sourceURI;
|
||||
|
@ -7,11 +7,10 @@ part 'file_schema_test_class.g.dart';
|
||||
|
||||
abstract class FileSchemaTestClass implements Built<FileSchemaTestClass, FileSchemaTestClassBuilder> {
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'file')
|
||||
MultipartFile get file;
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'files')
|
||||
BuiltList<MultipartFile> get files;
|
||||
|
@ -5,7 +5,6 @@ part 'foo.g.dart';
|
||||
|
||||
abstract class Foo implements Built<Foo, FooBuilder> {
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'bar')
|
||||
String get bar;
|
||||
|
@ -6,67 +6,68 @@ part 'format_test.g.dart';
|
||||
|
||||
abstract class FormatTest implements Built<FormatTest, FormatTestBuilder> {
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'integer')
|
||||
int get integer;
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'int32')
|
||||
int get int32;
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'int64')
|
||||
int get int64;
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'number')
|
||||
num get number;
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'float')
|
||||
double get float;
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'double')
|
||||
double get double_;
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'decimal')
|
||||
double get decimal;
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'string')
|
||||
String get string;
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'byte')
|
||||
String get byte;
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'binary')
|
||||
Uint8List get binary;
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'date')
|
||||
DateTime get date;
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'dateTime')
|
||||
DateTime get dateTime;
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'uuid')
|
||||
String get uuid;
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'password')
|
||||
String get password;
|
||||
/* A string that is a 10 digit number. Can have leading zeros. */
|
||||
|
||||
/// A string that is a 10 digit number. Can have leading zeros.
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'pattern_with_digits')
|
||||
String get patternWithDigits;
|
||||
/* A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. */
|
||||
|
||||
/// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'pattern_with_digits_and_delimiter')
|
||||
String get patternWithDigitsAndDelimiter;
|
||||
|
@ -5,11 +5,10 @@ part 'has_only_read_only.g.dart';
|
||||
|
||||
abstract class HasOnlyReadOnly implements Built<HasOnlyReadOnly, HasOnlyReadOnlyBuilder> {
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'bar')
|
||||
String get bar;
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'foo')
|
||||
String get foo;
|
||||
|
@ -5,7 +5,6 @@ part 'health_check_result.g.dart';
|
||||
|
||||
abstract class HealthCheckResult implements Built<HealthCheckResult, HealthCheckResultBuilder> {
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'NullableMessage')
|
||||
String get nullableMessage;
|
||||
|
@ -5,11 +5,12 @@ part 'inline_object.g.dart';
|
||||
|
||||
abstract class InlineObject implements Built<InlineObject, InlineObjectBuilder> {
|
||||
|
||||
/* Updated name of the pet */
|
||||
/// Updated name of the pet
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'name')
|
||||
String get name;
|
||||
/* Updated status of the pet */
|
||||
|
||||
/// Updated status of the pet
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'status')
|
||||
String get status;
|
||||
|
@ -6,11 +6,12 @@ part 'inline_object1.g.dart';
|
||||
|
||||
abstract class InlineObject1 implements Built<InlineObject1, InlineObject1Builder> {
|
||||
|
||||
/* Additional data to pass to server */
|
||||
/// Additional data to pass to server
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'additionalMetadata')
|
||||
String get additionalMetadata;
|
||||
/* file to upload */
|
||||
|
||||
/// file to upload
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'file')
|
||||
Uint8List get file;
|
||||
|
@ -6,12 +6,13 @@ part 'inline_object2.g.dart';
|
||||
|
||||
abstract class InlineObject2 implements Built<InlineObject2, InlineObject2Builder> {
|
||||
|
||||
/* Form parameter enum test (string array) */
|
||||
/// Form parameter enum test (string array)
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'enum_form_string_array')
|
||||
BuiltList<InlineObject2EnumFormStringArrayEnum> get enumFormStringArray;
|
||||
// enum enumFormStringArrayEnum { >, $, };
|
||||
/* Form parameter enum test (string) */
|
||||
// enum enumFormStringArrayEnum { >, $, };
|
||||
|
||||
/// Form parameter enum test (string)
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'enum_form_string')
|
||||
InlineObject2EnumFormStringEnum get enumFormString;
|
||||
|
@ -6,59 +6,72 @@ part 'inline_object3.g.dart';
|
||||
|
||||
abstract class InlineObject3 implements Built<InlineObject3, InlineObject3Builder> {
|
||||
|
||||
/* None */
|
||||
/// None
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'integer')
|
||||
int get integer;
|
||||
/* None */
|
||||
|
||||
/// None
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'int32')
|
||||
int get int32;
|
||||
/* None */
|
||||
|
||||
/// None
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'int64')
|
||||
int get int64;
|
||||
/* None */
|
||||
|
||||
/// None
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'number')
|
||||
num get number;
|
||||
/* None */
|
||||
|
||||
/// None
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'float')
|
||||
double get float;
|
||||
/* None */
|
||||
|
||||
/// None
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'double')
|
||||
double get double_;
|
||||
/* None */
|
||||
|
||||
/// None
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'string')
|
||||
String get string;
|
||||
/* None */
|
||||
|
||||
/// None
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'pattern_without_delimiter')
|
||||
String get patternWithoutDelimiter;
|
||||
/* None */
|
||||
|
||||
/// None
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'byte')
|
||||
String get byte;
|
||||
/* None */
|
||||
|
||||
/// None
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'binary')
|
||||
Uint8List get binary;
|
||||
/* None */
|
||||
|
||||
/// None
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'date')
|
||||
DateTime get date;
|
||||
/* None */
|
||||
|
||||
/// None
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'dateTime')
|
||||
DateTime get dateTime;
|
||||
/* None */
|
||||
|
||||
/// None
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'password')
|
||||
String get password;
|
||||
/* None */
|
||||
|
||||
/// None
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'callback')
|
||||
String get callback;
|
||||
|
@ -5,11 +5,12 @@ part 'inline_object4.g.dart';
|
||||
|
||||
abstract class InlineObject4 implements Built<InlineObject4, InlineObject4Builder> {
|
||||
|
||||
/* field1 */
|
||||
/// field1
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'param')
|
||||
String get param;
|
||||
/* field2 */
|
||||
|
||||
/// field2
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'param2')
|
||||
String get param2;
|
||||
|
@ -6,11 +6,12 @@ part 'inline_object5.g.dart';
|
||||
|
||||
abstract class InlineObject5 implements Built<InlineObject5, InlineObject5Builder> {
|
||||
|
||||
/* Additional data to pass to server */
|
||||
/// Additional data to pass to server
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'additionalMetadata')
|
||||
String get additionalMetadata;
|
||||
/* file to upload */
|
||||
|
||||
/// file to upload
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'requiredFile')
|
||||
Uint8List get requiredFile;
|
||||
|
@ -6,7 +6,6 @@ part 'inline_response_default.g.dart';
|
||||
|
||||
abstract class InlineResponseDefault implements Built<InlineResponseDefault, InlineResponseDefaultBuilder> {
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'string')
|
||||
Foo get string;
|
||||
|
@ -6,20 +6,19 @@ part 'map_test.g.dart';
|
||||
|
||||
abstract class MapTest implements Built<MapTest, MapTestBuilder> {
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'map_map_of_string')
|
||||
BuiltMap<String, BuiltMap<String, String>> get mapMapOfString;
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'map_of_enum_string')
|
||||
BuiltMap<String, MapTestInnerEnum> get mapOfEnumString;
|
||||
// enum mapOfEnumStringEnum { UPPER, lower, };
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'direct_map')
|
||||
BuiltMap<String, bool> get directMap;
|
||||
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: r'indirect_map')
|
||||
BuiltMap<String, bool> get indirectMap;
|
||||
|
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