forked from loafle/openapi-generator-original
[Dart] Convert DioError
to DioException
(#15783)
* Convert `DioError` to `DioException` * Update samples * Update dio version in example * Use proper dio version * Regenerate dart samples * Regenerate * Regenerate samples * update samples * remove outdated test files * update test * remove outdated test files --------- Co-authored-by: William Cheng <wing328hk@gmail.com>
This commit is contained in:
parent
747d9d9b51
commit
95cefaeecd
@ -73,7 +73,7 @@ try {
|
||||
{{#returnType}}
|
||||
print(response);
|
||||
{{/returnType}}
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print("Exception when calling {{classname}}->{{operationId}}: $e\n");
|
||||
}
|
||||
{{/-first}}{{/operation}}{{/operations}}{{/-first}}{{/apis}}{{/apiInfo}}
|
||||
|
@ -30,7 +30,7 @@ class {{classname}} {
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future]{{#returnType}} containing a [Response] with a [{{{.}}}] as data{{/returnType}}
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
{{#externalDocs}}
|
||||
/// {{description}}
|
||||
/// Also see [{{summary}} Documentation]({{url}})
|
||||
@ -93,13 +93,13 @@ class {{classname}} {
|
||||
try {
|
||||
{{#includeLibraryTemplate}}api/serialize{{/includeLibraryTemplate}}
|
||||
} catch(error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,{{#hasQueryParams}}
|
||||
queryParameters: _queryParameters,{{/hasQueryParams}}
|
||||
),
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -121,10 +121,10 @@ class {{classname}} {
|
||||
try {
|
||||
{{#includeLibraryTemplate}}api/deserialize{{/includeLibraryTemplate}}
|
||||
} catch (error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
|
@ -55,7 +55,7 @@ try {
|
||||
{{#returnType}}
|
||||
print(response);
|
||||
{{/returnType}}
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling {{classname}}->{{operationId}}: $e\n');
|
||||
}
|
||||
```
|
||||
|
@ -13,7 +13,7 @@ environment:
|
||||
sdk: '>=2.15.0 <3.0.0'
|
||||
|
||||
dependencies:
|
||||
dio: '^5.0.0'
|
||||
dio: '^5.2.0'
|
||||
{{#useBuiltValue}}
|
||||
one_of: '>=1.5.0 <2.0.0'
|
||||
one_of_serializer: '>=1.5.0 <2.0.0'
|
||||
|
@ -51,7 +51,7 @@ final api = Openapi().getDefaultApi();
|
||||
try {
|
||||
final response = await api.rootGet();
|
||||
print(response);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print("Exception when calling DefaultApi->rootGet: $e\n");
|
||||
}
|
||||
|
||||
|
@ -26,7 +26,7 @@ final api = Openapi().getDefaultApi();
|
||||
try {
|
||||
final response = api.rootGet();
|
||||
print(response);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling DefaultApi->rootGet: $e\n');
|
||||
}
|
||||
```
|
||||
|
@ -29,7 +29,7 @@ class DefaultApi {
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [Fruit] as data
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<Fruit>> rootGet({
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
@ -69,10 +69,10 @@ class DefaultApi {
|
||||
) as Fruit;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
|
@ -7,7 +7,7 @@ environment:
|
||||
sdk: '>=2.15.0 <3.0.0'
|
||||
|
||||
dependencies:
|
||||
dio: '^5.0.0'
|
||||
dio: '^5.2.0'
|
||||
one_of: '>=1.5.0 <2.0.0'
|
||||
one_of_serializer: '>=1.5.0 <2.0.0'
|
||||
built_value: '>=8.4.0 <9.0.0'
|
||||
|
@ -53,7 +53,7 @@ final BarCreate barCreate = ; // BarCreate |
|
||||
try {
|
||||
final response = await api.createBar(barCreate);
|
||||
print(response);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print("Exception when calling BarApi->createBar: $e\n");
|
||||
}
|
||||
|
||||
|
@ -27,7 +27,7 @@ final BarCreate barCreate = ; // BarCreate |
|
||||
try {
|
||||
final response = api.createBar(barCreate);
|
||||
print(response);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling BarApi->createBar: $e\n');
|
||||
}
|
||||
```
|
||||
|
@ -28,7 +28,7 @@ final Foo foo = ; // Foo | The Foo to be created
|
||||
try {
|
||||
final response = api.createFoo(foo);
|
||||
print(response);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling FooApi->createFoo: $e\n');
|
||||
}
|
||||
```
|
||||
@ -68,7 +68,7 @@ final api = Openapi().getFooApi();
|
||||
try {
|
||||
final response = api.getAllFoos();
|
||||
print(response);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling FooApi->getAllFoos: $e\n');
|
||||
}
|
||||
```
|
||||
|
@ -31,7 +31,7 @@ class BarApi {
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [Bar] as data
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<Bar>> createBar({
|
||||
required BarCreate barCreate,
|
||||
CancelToken? cancelToken,
|
||||
@ -62,12 +62,12 @@ class BarApi {
|
||||
_bodyData = _serializers.serialize(barCreate, specifiedType: _type);
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -92,10 +92,10 @@ class BarApi {
|
||||
) as Bar;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
|
@ -32,7 +32,7 @@ class FooApi {
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [FooRefOrValue] as data
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<FooRefOrValue>> createFoo({
|
||||
Foo? foo,
|
||||
CancelToken? cancelToken,
|
||||
@ -63,12 +63,12 @@ class FooApi {
|
||||
_bodyData = foo == null ? null : _serializers.serialize(foo, specifiedType: _type);
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -93,10 +93,10 @@ class FooApi {
|
||||
) as FooRefOrValue;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -126,7 +126,7 @@ class FooApi {
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [BuiltList<FooRefOrValue>] as data
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<BuiltList<FooRefOrValue>>> getAllFoos({
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
@ -166,10 +166,10 @@ class FooApi {
|
||||
) as BuiltList<FooRefOrValue>;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
|
@ -7,7 +7,7 @@ environment:
|
||||
sdk: '>=2.15.0 <3.0.0'
|
||||
|
||||
dependencies:
|
||||
dio: '^5.0.0'
|
||||
dio: '^5.2.0'
|
||||
one_of: '>=1.5.0 <2.0.0'
|
||||
one_of_serializer: '>=1.5.0 <2.0.0'
|
||||
built_value: '>=8.4.0 <9.0.0'
|
||||
|
@ -51,7 +51,7 @@ final api = Openapi().getDefaultApi();
|
||||
try {
|
||||
final response = await api.list();
|
||||
print(response);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print("Exception when calling DefaultApi->list: $e\n");
|
||||
}
|
||||
|
||||
|
@ -26,7 +26,7 @@ final api = Openapi().getDefaultApi();
|
||||
try {
|
||||
final response = api.list();
|
||||
print(response);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling DefaultApi->list: $e\n');
|
||||
}
|
||||
```
|
||||
|
@ -29,7 +29,7 @@ class DefaultApi {
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [Example] as data
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<Example>> list({
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
@ -69,10 +69,10 @@ class DefaultApi {
|
||||
) as Example;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
|
@ -7,7 +7,7 @@ environment:
|
||||
sdk: '>=2.15.0 <3.0.0'
|
||||
|
||||
dependencies:
|
||||
dio: '^5.0.0'
|
||||
dio: '^5.2.0'
|
||||
one_of: '>=1.5.0 <2.0.0'
|
||||
one_of_serializer: '>=1.5.0 <2.0.0'
|
||||
built_value: '>=8.4.0 <9.0.0'
|
||||
|
@ -53,7 +53,7 @@ final ModelClient modelClient = ; // ModelClient | client model
|
||||
try {
|
||||
final response = await api.call123testSpecialTags(modelClient);
|
||||
print(response);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print("Exception when calling AnotherFakeApi->call123testSpecialTags: $e\n");
|
||||
}
|
||||
|
||||
|
@ -29,7 +29,7 @@ final ModelClient modelClient = ; // ModelClient | client model
|
||||
try {
|
||||
final response = api.call123testSpecialTags(modelClient);
|
||||
print(response);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling AnotherFakeApi->call123testSpecialTags: $e\n');
|
||||
}
|
||||
```
|
||||
|
@ -0,0 +1,15 @@
|
||||
# openapi.model.CatAllOf
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**declawed** | **bool** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -26,7 +26,7 @@ final api = Openapi().getDefaultApi();
|
||||
try {
|
||||
final response = api.fooGet();
|
||||
print(response);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling DefaultApi->fooGet: $e\n');
|
||||
}
|
||||
```
|
||||
|
@ -0,0 +1,15 @@
|
||||
# openapi.model.DogAllOf
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**breed** | **String** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -45,7 +45,7 @@ final api = Openapi().getFakeApi();
|
||||
try {
|
||||
final response = api.fakeBigDecimalMap();
|
||||
print(response);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling FakeApi->fakeBigDecimalMap: $e\n');
|
||||
}
|
||||
```
|
||||
@ -82,7 +82,7 @@ final api = Openapi().getFakeApi();
|
||||
try {
|
||||
final response = api.fakeHealthGet();
|
||||
print(response);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling FakeApi->fakeHealthGet: $e\n');
|
||||
}
|
||||
```
|
||||
@ -121,7 +121,7 @@ final String header1 = header1_example; // String | header parameter
|
||||
|
||||
try {
|
||||
api.fakeHttpSignatureTest(pet, query1, header1);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling FakeApi->fakeHttpSignatureTest: $e\n');
|
||||
}
|
||||
```
|
||||
@ -166,7 +166,7 @@ final bool body = true; // bool | Input boolean as post body
|
||||
try {
|
||||
final response = api.fakeOuterBooleanSerialize(body);
|
||||
print(response);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling FakeApi->fakeOuterBooleanSerialize: $e\n');
|
||||
}
|
||||
```
|
||||
@ -209,7 +209,7 @@ final OuterComposite outerComposite = ; // OuterComposite | Input composite as p
|
||||
try {
|
||||
final response = api.fakeOuterCompositeSerialize(outerComposite);
|
||||
print(response);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling FakeApi->fakeOuterCompositeSerialize: $e\n');
|
||||
}
|
||||
```
|
||||
@ -252,7 +252,7 @@ final num body = 8.14; // num | Input number as post body
|
||||
try {
|
||||
final response = api.fakeOuterNumberSerialize(body);
|
||||
print(response);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling FakeApi->fakeOuterNumberSerialize: $e\n');
|
||||
}
|
||||
```
|
||||
@ -295,7 +295,7 @@ final String body = body_example; // String | Input string as post body
|
||||
try {
|
||||
final response = api.fakeOuterStringSerialize(body);
|
||||
print(response);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling FakeApi->fakeOuterStringSerialize: $e\n');
|
||||
}
|
||||
```
|
||||
@ -338,7 +338,7 @@ final OuterObjectWithEnumProperty outerObjectWithEnumProperty = ; // OuterObject
|
||||
try {
|
||||
final response = api.fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty);
|
||||
print(response);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling FakeApi->fakePropertyEnumIntegerSerialize: $e\n');
|
||||
}
|
||||
```
|
||||
@ -380,7 +380,7 @@ final MultipartFile body = BINARY_DATA_HERE; // MultipartFile | image to upload
|
||||
|
||||
try {
|
||||
api.testBodyWithBinary(body);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling FakeApi->testBodyWithBinary: $e\n');
|
||||
}
|
||||
```
|
||||
@ -422,7 +422,7 @@ final FileSchemaTestClass fileSchemaTestClass = ; // FileSchemaTestClass |
|
||||
|
||||
try {
|
||||
api.testBodyWithFileSchema(fileSchemaTestClass);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling FakeApi->testBodyWithFileSchema: $e\n');
|
||||
}
|
||||
```
|
||||
@ -463,7 +463,7 @@ final User user = ; // User |
|
||||
|
||||
try {
|
||||
api.testBodyWithQueryParams(query, user);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling FakeApi->testBodyWithQueryParams: $e\n');
|
||||
}
|
||||
```
|
||||
@ -507,7 +507,7 @@ final ModelClient modelClient = ; // ModelClient | client model
|
||||
try {
|
||||
final response = api.testClientModel(modelClient);
|
||||
print(response);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling FakeApi->testClientModel: $e\n');
|
||||
}
|
||||
```
|
||||
@ -565,7 +565,7 @@ final String callback = callback_example; // String | None
|
||||
|
||||
try {
|
||||
api.testEndpointParameters(number, double_, patternWithoutDelimiter, byte, integer, int32, int64, float, string, binary, date, dateTime, password, callback);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling FakeApi->testEndpointParameters: $e\n');
|
||||
}
|
||||
```
|
||||
@ -628,7 +628,7 @@ final String enumFormString = enumFormString_example; // String | Form parameter
|
||||
|
||||
try {
|
||||
api.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling FakeApi->testEnumParameters: $e\n');
|
||||
}
|
||||
```
|
||||
@ -683,7 +683,7 @@ final int int64Group = 789; // int | Integer in group parameters
|
||||
|
||||
try {
|
||||
api.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling FakeApi->testGroupParameters: $e\n');
|
||||
}
|
||||
```
|
||||
@ -730,7 +730,7 @@ final Map<String, String> requestBody = ; // Map<String, String> | request body
|
||||
|
||||
try {
|
||||
api.testInlineAdditionalProperties(requestBody);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling FakeApi->testInlineAdditionalProperties: $e\n');
|
||||
}
|
||||
```
|
||||
@ -773,7 +773,7 @@ final String param2 = param2_example; // String | field2
|
||||
|
||||
try {
|
||||
api.testJsonFormData(param, param2);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling FakeApi->testJsonFormData: $e\n');
|
||||
}
|
||||
```
|
||||
@ -822,7 +822,7 @@ final Map<String, String> language = ; // Map<String, String> |
|
||||
|
||||
try {
|
||||
api.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling FakeApi->testQueryParameterCollectionFormat: $e\n');
|
||||
}
|
||||
```
|
||||
|
@ -33,7 +33,7 @@ final ModelClient modelClient = ; // ModelClient | client model
|
||||
try {
|
||||
final response = api.testClassname(modelClient);
|
||||
print(response);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling FakeClassnameTags123Api->testClassname: $e\n');
|
||||
}
|
||||
```
|
||||
|
@ -38,7 +38,7 @@ final Pet pet = ; // Pet | Pet object that needs to be added to the store
|
||||
|
||||
try {
|
||||
api.addPet(pet);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling PetApi->addPet: $e\n');
|
||||
}
|
||||
```
|
||||
@ -83,7 +83,7 @@ final String apiKey = apiKey_example; // String |
|
||||
|
||||
try {
|
||||
api.deletePet(petId, apiKey);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling PetApi->deletePet: $e\n');
|
||||
}
|
||||
```
|
||||
@ -129,7 +129,7 @@ final List<String> status = ; // List<String> | Status values that need to be co
|
||||
try {
|
||||
final response = api.findPetsByStatus(status);
|
||||
print(response);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling PetApi->findPetsByStatus: $e\n');
|
||||
}
|
||||
```
|
||||
@ -174,7 +174,7 @@ final Set<String> tags = ; // Set<String> | Tags to filter by
|
||||
try {
|
||||
final response = api.findPetsByTags(tags);
|
||||
print(response);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling PetApi->findPetsByTags: $e\n');
|
||||
}
|
||||
```
|
||||
@ -221,7 +221,7 @@ final int petId = 789; // int | ID of pet to return
|
||||
try {
|
||||
final response = api.getPetById(petId);
|
||||
print(response);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling PetApi->getPetById: $e\n');
|
||||
}
|
||||
```
|
||||
@ -265,7 +265,7 @@ final Pet pet = ; // Pet | Pet object that needs to be added to the store
|
||||
|
||||
try {
|
||||
api.updatePet(pet);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling PetApi->updatePet: $e\n');
|
||||
}
|
||||
```
|
||||
@ -311,7 +311,7 @@ final String status = status_example; // String | Updated status of the pet
|
||||
|
||||
try {
|
||||
api.updatePetWithForm(petId, name, status);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling PetApi->updatePetWithForm: $e\n');
|
||||
}
|
||||
```
|
||||
@ -360,7 +360,7 @@ final MultipartFile file = BINARY_DATA_HERE; // MultipartFile | file to upload
|
||||
try {
|
||||
final response = api.uploadFile(petId, additionalMetadata, file);
|
||||
print(response);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling PetApi->uploadFile: $e\n');
|
||||
}
|
||||
```
|
||||
@ -409,7 +409,7 @@ final String additionalMetadata = additionalMetadata_example; // String | Additi
|
||||
try {
|
||||
final response = api.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata);
|
||||
print(response);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling PetApi->uploadFileWithRequiredFile: $e\n');
|
||||
}
|
||||
```
|
||||
|
@ -31,7 +31,7 @@ final String orderId = orderId_example; // String | ID of the order that needs t
|
||||
|
||||
try {
|
||||
api.deleteOrder(orderId);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling StoreApi->deleteOrder: $e\n');
|
||||
}
|
||||
```
|
||||
@ -77,7 +77,7 @@ final api = Openapi().getStoreApi();
|
||||
try {
|
||||
final response = api.getInventory();
|
||||
print(response);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling StoreApi->getInventory: $e\n');
|
||||
}
|
||||
```
|
||||
@ -117,7 +117,7 @@ final int orderId = 789; // int | ID of pet that needs to be fetched
|
||||
try {
|
||||
final response = api.getOrderById(orderId);
|
||||
print(response);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling StoreApi->getOrderById: $e\n');
|
||||
}
|
||||
```
|
||||
@ -160,7 +160,7 @@ final Order order = ; // Order | order placed for purchasing the pet
|
||||
try {
|
||||
final response = api.placeOrder(order);
|
||||
print(response);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling StoreApi->placeOrder: $e\n');
|
||||
}
|
||||
```
|
||||
|
@ -35,7 +35,7 @@ final User user = ; // User | Created user object
|
||||
|
||||
try {
|
||||
api.createUser(user);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling UserApi->createUser: $e\n');
|
||||
}
|
||||
```
|
||||
@ -77,7 +77,7 @@ final List<User> user = ; // List<User> | List of user object
|
||||
|
||||
try {
|
||||
api.createUsersWithArrayInput(user);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling UserApi->createUsersWithArrayInput: $e\n');
|
||||
}
|
||||
```
|
||||
@ -119,7 +119,7 @@ final List<User> user = ; // List<User> | List of user object
|
||||
|
||||
try {
|
||||
api.createUsersWithListInput(user);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling UserApi->createUsersWithListInput: $e\n');
|
||||
}
|
||||
```
|
||||
@ -161,7 +161,7 @@ final String username = username_example; // String | The name that needs to be
|
||||
|
||||
try {
|
||||
api.deleteUser(username);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling UserApi->deleteUser: $e\n');
|
||||
}
|
||||
```
|
||||
@ -204,7 +204,7 @@ final String username = username_example; // String | The name that needs to be
|
||||
try {
|
||||
final response = api.getUserByName(username);
|
||||
print(response);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling UserApi->getUserByName: $e\n');
|
||||
}
|
||||
```
|
||||
@ -248,7 +248,7 @@ final String password = password_example; // String | The password for login in
|
||||
try {
|
||||
final response = api.loginUser(username, password);
|
||||
print(response);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling UserApi->loginUser: $e\n');
|
||||
}
|
||||
```
|
||||
@ -290,7 +290,7 @@ final api = Openapi().getUserApi();
|
||||
|
||||
try {
|
||||
api.logoutUser();
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling UserApi->logoutUser: $e\n');
|
||||
}
|
||||
```
|
||||
@ -330,7 +330,7 @@ final User user = ; // User | Updated user object
|
||||
|
||||
try {
|
||||
api.updateUser(username, user);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling UserApi->updateUser: $e\n');
|
||||
}
|
||||
```
|
||||
|
@ -30,7 +30,7 @@ class AnotherFakeApi {
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [ModelClient] as data
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<ModelClient>> call123testSpecialTags({
|
||||
required ModelClient modelClient,
|
||||
CancelToken? cancelToken,
|
||||
@ -59,12 +59,12 @@ class AnotherFakeApi {
|
||||
try {
|
||||
_bodyData=jsonEncode(modelClient);
|
||||
} catch(error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -85,10 +85,10 @@ _bodyData=jsonEncode(modelClient);
|
||||
final rawData = _response.data;
|
||||
_responseData = rawData == null ? null : deserialize<ModelClient, ModelClient>(rawData, 'ModelClient', growable: true);
|
||||
} catch (error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
|
@ -29,7 +29,7 @@ class DefaultApi {
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [FooGetDefaultResponse] as data
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<FooGetDefaultResponse>> fooGet({
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
@ -65,10 +65,10 @@ class DefaultApi {
|
||||
final rawData = _response.data;
|
||||
_responseData = rawData == null ? null : deserialize<FooGetDefaultResponse, FooGetDefaultResponse>(rawData, 'FooGetDefaultResponse', growable: true);
|
||||
} catch (error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
|
@ -37,7 +37,7 @@ class FakeApi {
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [FakeBigDecimalMap200Response] as data
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<FakeBigDecimalMap200Response>> fakeBigDecimalMap({
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
@ -73,10 +73,10 @@ class FakeApi {
|
||||
final rawData = _response.data;
|
||||
_responseData = rawData == null ? null : deserialize<FakeBigDecimalMap200Response, FakeBigDecimalMap200Response>(rawData, 'FakeBigDecimalMap200Response', growable: true);
|
||||
} catch (error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -106,7 +106,7 @@ _responseData = rawData == null ? null : deserialize<FakeBigDecimalMap200Respons
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [HealthCheckResult] as data
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<HealthCheckResult>> fakeHealthGet({
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
@ -142,10 +142,10 @@ _responseData = rawData == null ? null : deserialize<FakeBigDecimalMap200Respons
|
||||
final rawData = _response.data;
|
||||
_responseData = rawData == null ? null : deserialize<HealthCheckResult, HealthCheckResult>(rawData, 'HealthCheckResult', growable: true);
|
||||
} catch (error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -178,7 +178,7 @@ _responseData = rawData == null ? null : deserialize<HealthCheckResult, HealthCh
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future]
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<void>> fakeHttpSignatureTest({
|
||||
required Pet pet,
|
||||
String? query1,
|
||||
@ -220,13 +220,13 @@ _responseData = rawData == null ? null : deserialize<HealthCheckResult, HealthCh
|
||||
try {
|
||||
_bodyData=jsonEncode(pet);
|
||||
} catch(error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
queryParameters: _queryParameters,
|
||||
),
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -258,7 +258,7 @@ _bodyData=jsonEncode(pet);
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [bool] as data
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<bool>> fakeOuterBooleanSerialize({
|
||||
bool? body,
|
||||
CancelToken? cancelToken,
|
||||
@ -287,12 +287,12 @@ _bodyData=jsonEncode(pet);
|
||||
try {
|
||||
_bodyData=jsonEncode(body);
|
||||
} catch(error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -313,10 +313,10 @@ _bodyData=jsonEncode(body);
|
||||
final rawData = _response.data;
|
||||
_responseData = rawData == null ? null : deserialize<bool, bool>(rawData, 'bool', growable: true);
|
||||
} catch (error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -347,7 +347,7 @@ _responseData = rawData == null ? null : deserialize<bool, bool>(rawData, 'bool'
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [OuterComposite] as data
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<OuterComposite>> fakeOuterCompositeSerialize({
|
||||
OuterComposite? outerComposite,
|
||||
CancelToken? cancelToken,
|
||||
@ -376,12 +376,12 @@ _responseData = rawData == null ? null : deserialize<bool, bool>(rawData, 'bool'
|
||||
try {
|
||||
_bodyData=jsonEncode(outerComposite);
|
||||
} catch(error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -402,10 +402,10 @@ _bodyData=jsonEncode(outerComposite);
|
||||
final rawData = _response.data;
|
||||
_responseData = rawData == null ? null : deserialize<OuterComposite, OuterComposite>(rawData, 'OuterComposite', growable: true);
|
||||
} catch (error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -436,7 +436,7 @@ _responseData = rawData == null ? null : deserialize<OuterComposite, OuterCompos
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [num] as data
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<num>> fakeOuterNumberSerialize({
|
||||
num? body,
|
||||
CancelToken? cancelToken,
|
||||
@ -465,12 +465,12 @@ _responseData = rawData == null ? null : deserialize<OuterComposite, OuterCompos
|
||||
try {
|
||||
_bodyData=jsonEncode(body);
|
||||
} catch(error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -491,10 +491,10 @@ _bodyData=jsonEncode(body);
|
||||
final rawData = _response.data;
|
||||
_responseData = rawData == null ? null : deserialize<num, num>(rawData, 'num', growable: true);
|
||||
} catch (error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -525,7 +525,7 @@ _responseData = rawData == null ? null : deserialize<num, num>(rawData, 'num', g
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [String] as data
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<String>> fakeOuterStringSerialize({
|
||||
String? body,
|
||||
CancelToken? cancelToken,
|
||||
@ -554,12 +554,12 @@ _responseData = rawData == null ? null : deserialize<num, num>(rawData, 'num', g
|
||||
try {
|
||||
_bodyData=jsonEncode(body);
|
||||
} catch(error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -580,10 +580,10 @@ _bodyData=jsonEncode(body);
|
||||
final rawData = _response.data;
|
||||
_responseData = rawData == null ? null : deserialize<String, String>(rawData, 'String', growable: true);
|
||||
} catch (error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -614,7 +614,7 @@ _responseData = rawData == null ? null : deserialize<String, String>(rawData, 'S
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [OuterObjectWithEnumProperty] as data
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<OuterObjectWithEnumProperty>> fakePropertyEnumIntegerSerialize({
|
||||
required OuterObjectWithEnumProperty outerObjectWithEnumProperty,
|
||||
CancelToken? cancelToken,
|
||||
@ -643,12 +643,12 @@ _responseData = rawData == null ? null : deserialize<String, String>(rawData, 'S
|
||||
try {
|
||||
_bodyData=jsonEncode(outerObjectWithEnumProperty);
|
||||
} catch(error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -669,10 +669,10 @@ _bodyData=jsonEncode(outerObjectWithEnumProperty);
|
||||
final rawData = _response.data;
|
||||
_responseData = rawData == null ? null : deserialize<OuterObjectWithEnumProperty, OuterObjectWithEnumProperty>(rawData, 'OuterObjectWithEnumProperty', growable: true);
|
||||
} catch (error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -703,7 +703,7 @@ _responseData = rawData == null ? null : deserialize<OuterObjectWithEnumProperty
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future]
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<void>> testBodyWithBinary({
|
||||
MultipartFile? body,
|
||||
CancelToken? cancelToken,
|
||||
@ -732,12 +732,12 @@ _responseData = rawData == null ? null : deserialize<OuterObjectWithEnumProperty
|
||||
try {
|
||||
_bodyData=jsonEncode(body);
|
||||
} catch(error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -768,7 +768,7 @@ _bodyData=jsonEncode(body);
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future]
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<void>> testBodyWithFileSchema({
|
||||
required FileSchemaTestClass fileSchemaTestClass,
|
||||
CancelToken? cancelToken,
|
||||
@ -797,12 +797,12 @@ _bodyData=jsonEncode(body);
|
||||
try {
|
||||
_bodyData=jsonEncode(fileSchemaTestClass);
|
||||
} catch(error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -834,7 +834,7 @@ _bodyData=jsonEncode(fileSchemaTestClass);
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future]
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<void>> testBodyWithQueryParams({
|
||||
required String query,
|
||||
required User user,
|
||||
@ -868,13 +868,13 @@ _bodyData=jsonEncode(fileSchemaTestClass);
|
||||
try {
|
||||
_bodyData=jsonEncode(user);
|
||||
} catch(error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
queryParameters: _queryParameters,
|
||||
),
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -906,7 +906,7 @@ _bodyData=jsonEncode(user);
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [ModelClient] as data
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<ModelClient>> testClientModel({
|
||||
required ModelClient modelClient,
|
||||
CancelToken? cancelToken,
|
||||
@ -935,12 +935,12 @@ _bodyData=jsonEncode(user);
|
||||
try {
|
||||
_bodyData=jsonEncode(modelClient);
|
||||
} catch(error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -961,10 +961,10 @@ _bodyData=jsonEncode(modelClient);
|
||||
final rawData = _response.data;
|
||||
_responseData = rawData == null ? null : deserialize<ModelClient, ModelClient>(rawData, 'ModelClient', growable: true);
|
||||
} catch (error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -1008,7 +1008,7 @@ _responseData = rawData == null ? null : deserialize<ModelClient, ModelClient>(r
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future]
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<void>> testEndpointParameters({
|
||||
required num number,
|
||||
required double double_,
|
||||
@ -1056,12 +1056,12 @@ _responseData = rawData == null ? null : deserialize<ModelClient, ModelClient>(r
|
||||
try {
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -1100,7 +1100,7 @@ _responseData = rawData == null ? null : deserialize<ModelClient, ModelClient>(r
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future]
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<void>> testEnumParameters({
|
||||
List<String>? enumHeaderStringArray,
|
||||
String? enumHeaderString = '-efg',
|
||||
@ -1147,13 +1147,13 @@ _responseData = rawData == null ? null : deserialize<ModelClient, ModelClient>(r
|
||||
try {
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
queryParameters: _queryParameters,
|
||||
),
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -1190,7 +1190,7 @@ _responseData = rawData == null ? null : deserialize<ModelClient, ModelClient>(r
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future]
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<void>> testGroupParameters({
|
||||
required int requiredStringGroup,
|
||||
required bool requiredBooleanGroup,
|
||||
@ -1258,7 +1258,7 @@ _responseData = rawData == null ? null : deserialize<ModelClient, ModelClient>(r
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future]
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<void>> testInlineAdditionalProperties({
|
||||
required Map<String, String> requestBody,
|
||||
CancelToken? cancelToken,
|
||||
@ -1287,12 +1287,12 @@ _responseData = rawData == null ? null : deserialize<ModelClient, ModelClient>(r
|
||||
try {
|
||||
_bodyData=jsonEncode(requestBody);
|
||||
} catch(error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -1324,7 +1324,7 @@ _bodyData=jsonEncode(requestBody);
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future]
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<void>> testJsonFormData({
|
||||
required String param,
|
||||
required String param2,
|
||||
@ -1354,12 +1354,12 @@ _bodyData=jsonEncode(requestBody);
|
||||
try {
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -1396,7 +1396,7 @@ _bodyData=jsonEncode(requestBody);
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future]
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<void>> testQueryParameterCollectionFormat({
|
||||
required List<String> pipe,
|
||||
required List<String> ioutil,
|
||||
|
@ -30,7 +30,7 @@ class FakeClassnameTags123Api {
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [ModelClient] as data
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<ModelClient>> testClassname({
|
||||
required ModelClient modelClient,
|
||||
CancelToken? cancelToken,
|
||||
@ -66,12 +66,12 @@ class FakeClassnameTags123Api {
|
||||
try {
|
||||
_bodyData=jsonEncode(modelClient);
|
||||
} catch(error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -92,10 +92,10 @@ _bodyData=jsonEncode(modelClient);
|
||||
final rawData = _response.data;
|
||||
_responseData = rawData == null ? null : deserialize<ModelClient, ModelClient>(rawData, 'ModelClient', growable: true);
|
||||
} catch (error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
|
@ -31,7 +31,7 @@ class PetApi {
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future]
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<void>> addPet({
|
||||
required Pet pet,
|
||||
CancelToken? cancelToken,
|
||||
@ -65,12 +65,12 @@ class PetApi {
|
||||
try {
|
||||
_bodyData=jsonEncode(pet);
|
||||
} catch(error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -102,7 +102,7 @@ _bodyData=jsonEncode(pet);
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future]
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<void>> deletePet({
|
||||
required int petId,
|
||||
String? apiKey,
|
||||
@ -156,7 +156,7 @@ _bodyData=jsonEncode(pet);
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [List<Pet>] as data
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<List<Pet>>> findPetsByStatus({
|
||||
@Deprecated('status is deprecated') required List<String> status,
|
||||
CancelToken? cancelToken,
|
||||
@ -203,10 +203,10 @@ _bodyData=jsonEncode(pet);
|
||||
final rawData = _response.data;
|
||||
_responseData = rawData == null ? null : deserialize<List<Pet>, Pet>(rawData, 'List<Pet>', growable: true);
|
||||
} catch (error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -237,7 +237,7 @@ _responseData = rawData == null ? null : deserialize<List<Pet>, Pet>(rawData, 'L
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [Set<Pet>] as data
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
@Deprecated('This operation has been deprecated')
|
||||
Future<Response<Set<Pet>>> findPetsByTags({
|
||||
required Set<String> tags,
|
||||
@ -285,10 +285,10 @@ _responseData = rawData == null ? null : deserialize<List<Pet>, Pet>(rawData, 'L
|
||||
final rawData = _response.data;
|
||||
_responseData = rawData == null ? null : deserialize<Set<Pet>, Pet>(rawData, 'Set<Pet>', growable: true);
|
||||
} catch (error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -319,7 +319,7 @@ _responseData = rawData == null ? null : deserialize<Set<Pet>, Pet>(rawData, 'Se
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [Pet] as data
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<Pet>> getPetById({
|
||||
required int petId,
|
||||
CancelToken? cancelToken,
|
||||
@ -363,10 +363,10 @@ _responseData = rawData == null ? null : deserialize<Set<Pet>, Pet>(rawData, 'Se
|
||||
final rawData = _response.data;
|
||||
_responseData = rawData == null ? null : deserialize<Pet, Pet>(rawData, 'Pet', growable: true);
|
||||
} catch (error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -397,7 +397,7 @@ _responseData = rawData == null ? null : deserialize<Pet, Pet>(rawData, 'Pet', g
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future]
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<void>> updatePet({
|
||||
required Pet pet,
|
||||
CancelToken? cancelToken,
|
||||
@ -431,12 +431,12 @@ _responseData = rawData == null ? null : deserialize<Pet, Pet>(rawData, 'Pet', g
|
||||
try {
|
||||
_bodyData=jsonEncode(pet);
|
||||
} catch(error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -469,7 +469,7 @@ _bodyData=jsonEncode(pet);
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future]
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<void>> updatePetWithForm({
|
||||
required int petId,
|
||||
String? name,
|
||||
@ -505,12 +505,12 @@ _bodyData=jsonEncode(pet);
|
||||
try {
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -543,7 +543,7 @@ _bodyData=jsonEncode(pet);
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [ApiResponse] as data
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<ApiResponse>> uploadFile({
|
||||
required int petId,
|
||||
String? additionalMetadata,
|
||||
@ -579,12 +579,12 @@ _bodyData=jsonEncode(pet);
|
||||
try {
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -605,10 +605,10 @@ _bodyData=jsonEncode(pet);
|
||||
final rawData = _response.data;
|
||||
_responseData = rawData == null ? null : deserialize<ApiResponse, ApiResponse>(rawData, 'ApiResponse', growable: true);
|
||||
} catch (error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -641,7 +641,7 @@ _responseData = rawData == null ? null : deserialize<ApiResponse, ApiResponse>(r
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [ApiResponse] as data
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<ApiResponse>> uploadFileWithRequiredFile({
|
||||
required int petId,
|
||||
required MultipartFile requiredFile,
|
||||
@ -677,12 +677,12 @@ _responseData = rawData == null ? null : deserialize<ApiResponse, ApiResponse>(r
|
||||
try {
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -703,10 +703,10 @@ _responseData = rawData == null ? null : deserialize<ApiResponse, ApiResponse>(r
|
||||
final rawData = _response.data;
|
||||
_responseData = rawData == null ? null : deserialize<ApiResponse, ApiResponse>(rawData, 'ApiResponse', growable: true);
|
||||
} catch (error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
|
@ -30,7 +30,7 @@ class StoreApi {
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future]
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<void>> deleteOrder({
|
||||
required String orderId,
|
||||
CancelToken? cancelToken,
|
||||
@ -76,7 +76,7 @@ class StoreApi {
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [Map<String, int>] as data
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<Map<String, int>>> getInventory({
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
@ -119,10 +119,10 @@ class StoreApi {
|
||||
final rawData = _response.data;
|
||||
_responseData = rawData == null ? null : deserialize<Map<String, int>, int>(rawData, 'Map<String, int>', growable: true);
|
||||
} catch (error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -153,7 +153,7 @@ _responseData = rawData == null ? null : deserialize<Map<String, int>, int>(rawD
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [Order] as data
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<Order>> getOrderById({
|
||||
required int orderId,
|
||||
CancelToken? cancelToken,
|
||||
@ -190,10 +190,10 @@ _responseData = rawData == null ? null : deserialize<Map<String, int>, int>(rawD
|
||||
final rawData = _response.data;
|
||||
_responseData = rawData == null ? null : deserialize<Order, Order>(rawData, 'Order', growable: true);
|
||||
} catch (error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -224,7 +224,7 @@ _responseData = rawData == null ? null : deserialize<Order, Order>(rawData, 'Ord
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [Order] as data
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<Order>> placeOrder({
|
||||
required Order order,
|
||||
CancelToken? cancelToken,
|
||||
@ -253,12 +253,12 @@ _responseData = rawData == null ? null : deserialize<Order, Order>(rawData, 'Ord
|
||||
try {
|
||||
_bodyData=jsonEncode(order);
|
||||
} catch(error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -279,10 +279,10 @@ _bodyData=jsonEncode(order);
|
||||
final rawData = _response.data;
|
||||
_responseData = rawData == null ? null : deserialize<Order, Order>(rawData, 'Order', growable: true);
|
||||
} catch (error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
|
@ -30,7 +30,7 @@ class UserApi {
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future]
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<void>> createUser({
|
||||
required User user,
|
||||
CancelToken? cancelToken,
|
||||
@ -59,12 +59,12 @@ class UserApi {
|
||||
try {
|
||||
_bodyData=jsonEncode(user);
|
||||
} catch(error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -95,7 +95,7 @@ _bodyData=jsonEncode(user);
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future]
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<void>> createUsersWithArrayInput({
|
||||
required List<User> user,
|
||||
CancelToken? cancelToken,
|
||||
@ -124,12 +124,12 @@ _bodyData=jsonEncode(user);
|
||||
try {
|
||||
_bodyData=jsonEncode(user);
|
||||
} catch(error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -160,7 +160,7 @@ _bodyData=jsonEncode(user);
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future]
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<void>> createUsersWithListInput({
|
||||
required List<User> user,
|
||||
CancelToken? cancelToken,
|
||||
@ -189,12 +189,12 @@ _bodyData=jsonEncode(user);
|
||||
try {
|
||||
_bodyData=jsonEncode(user);
|
||||
} catch(error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -225,7 +225,7 @@ _bodyData=jsonEncode(user);
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future]
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<void>> deleteUser({
|
||||
required String username,
|
||||
CancelToken? cancelToken,
|
||||
@ -272,7 +272,7 @@ _bodyData=jsonEncode(user);
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [User] as data
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<User>> getUserByName({
|
||||
required String username,
|
||||
CancelToken? cancelToken,
|
||||
@ -309,10 +309,10 @@ _bodyData=jsonEncode(user);
|
||||
final rawData = _response.data;
|
||||
_responseData = rawData == null ? null : deserialize<User, User>(rawData, 'User', growable: true);
|
||||
} catch (error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -344,7 +344,7 @@ _responseData = rawData == null ? null : deserialize<User, User>(rawData, 'User'
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [String] as data
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<String>> loginUser({
|
||||
required String username,
|
||||
required String password,
|
||||
@ -388,10 +388,10 @@ _responseData = rawData == null ? null : deserialize<User, User>(rawData, 'User'
|
||||
final rawData = _response.data;
|
||||
_responseData = rawData == null ? null : deserialize<String, String>(rawData, 'String', growable: true);
|
||||
} catch (error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -421,7 +421,7 @@ _responseData = rawData == null ? null : deserialize<String, String>(rawData, 'S
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future]
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<void>> logoutUser({
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
@ -468,7 +468,7 @@ _responseData = rawData == null ? null : deserialize<String, String>(rawData, 'S
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future]
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<void>> updateUser({
|
||||
required String username,
|
||||
required User user,
|
||||
@ -498,12 +498,12 @@ _responseData = rawData == null ? null : deserialize<String, String>(rawData, 'S
|
||||
try {
|
||||
_bodyData=jsonEncode(user);
|
||||
} catch(error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
|
@ -0,0 +1,54 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_element
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
part 'cat_all_of.g.dart';
|
||||
|
||||
|
||||
@JsonSerializable(
|
||||
checked: true,
|
||||
createToJson: true,
|
||||
disallowUnrecognizedKeys: false,
|
||||
explicitToJson: true,
|
||||
)
|
||||
class CatAllOf {
|
||||
/// Returns a new [CatAllOf] instance.
|
||||
CatAllOf({
|
||||
|
||||
this.declawed,
|
||||
});
|
||||
|
||||
@JsonKey(
|
||||
|
||||
name: r'declawed',
|
||||
required: false,
|
||||
includeIfNull: false
|
||||
)
|
||||
|
||||
|
||||
final bool? declawed;
|
||||
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is CatAllOf &&
|
||||
other.declawed == declawed;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
declawed.hashCode;
|
||||
|
||||
factory CatAllOf.fromJson(Map<String, dynamic> json) => _$CatAllOfFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$CatAllOfToJson(this);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return toJson().toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,54 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_element
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
part 'dog_all_of.g.dart';
|
||||
|
||||
|
||||
@JsonSerializable(
|
||||
checked: true,
|
||||
createToJson: true,
|
||||
disallowUnrecognizedKeys: false,
|
||||
explicitToJson: true,
|
||||
)
|
||||
class DogAllOf {
|
||||
/// Returns a new [DogAllOf] instance.
|
||||
DogAllOf({
|
||||
|
||||
this.breed,
|
||||
});
|
||||
|
||||
@JsonKey(
|
||||
|
||||
name: r'breed',
|
||||
required: false,
|
||||
includeIfNull: false
|
||||
)
|
||||
|
||||
|
||||
final String? breed;
|
||||
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is DogAllOf &&
|
||||
other.breed == breed;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
breed.hashCode;
|
||||
|
||||
factory DogAllOf.fromJson(Map<String, dynamic> json) => _$DogAllOfFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$DogAllOfToJson(this);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return toJson().toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -7,7 +7,7 @@ environment:
|
||||
sdk: '>=2.15.0 <3.0.0'
|
||||
|
||||
dependencies:
|
||||
dio: '^5.0.0'
|
||||
dio: '^5.2.0'
|
||||
json_annotation: '^4.4.0'
|
||||
|
||||
dev_dependencies:
|
||||
|
@ -52,7 +52,7 @@ final ModelClient modelClient = ; // ModelClient | client model
|
||||
try {
|
||||
final response = await api.call123testSpecialTags(modelClient);
|
||||
print(response);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print("Exception when calling AnotherFakeApi->call123testSpecialTags: $e\n");
|
||||
}
|
||||
|
||||
|
@ -29,7 +29,7 @@ final ModelClient modelClient = ; // ModelClient | client model
|
||||
try {
|
||||
final response = api.call123testSpecialTags(modelClient);
|
||||
print(response);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling AnotherFakeApi->call123testSpecialTags: $e\n');
|
||||
}
|
||||
```
|
||||
|
@ -0,0 +1,15 @@
|
||||
# openapi.model.CatAllOf
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**declawed** | **bool** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -26,7 +26,7 @@ final api = Openapi().getDefaultApi();
|
||||
try {
|
||||
final response = api.fooGet();
|
||||
print(response);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling DefaultApi->fooGet: $e\n');
|
||||
}
|
||||
```
|
||||
|
@ -0,0 +1,15 @@
|
||||
# openapi.model.DogAllOf
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**breed** | **String** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -45,7 +45,7 @@ final api = Openapi().getFakeApi();
|
||||
try {
|
||||
final response = api.fakeBigDecimalMap();
|
||||
print(response);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling FakeApi->fakeBigDecimalMap: $e\n');
|
||||
}
|
||||
```
|
||||
@ -82,7 +82,7 @@ final api = Openapi().getFakeApi();
|
||||
try {
|
||||
final response = api.fakeHealthGet();
|
||||
print(response);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling FakeApi->fakeHealthGet: $e\n');
|
||||
}
|
||||
```
|
||||
@ -121,7 +121,7 @@ final String header1 = header1_example; // String | header parameter
|
||||
|
||||
try {
|
||||
api.fakeHttpSignatureTest(pet, query1, header1);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling FakeApi->fakeHttpSignatureTest: $e\n');
|
||||
}
|
||||
```
|
||||
@ -166,7 +166,7 @@ final bool body = true; // bool | Input boolean as post body
|
||||
try {
|
||||
final response = api.fakeOuterBooleanSerialize(body);
|
||||
print(response);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling FakeApi->fakeOuterBooleanSerialize: $e\n');
|
||||
}
|
||||
```
|
||||
@ -209,7 +209,7 @@ final OuterComposite outerComposite = ; // OuterComposite | Input composite as p
|
||||
try {
|
||||
final response = api.fakeOuterCompositeSerialize(outerComposite);
|
||||
print(response);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling FakeApi->fakeOuterCompositeSerialize: $e\n');
|
||||
}
|
||||
```
|
||||
@ -252,7 +252,7 @@ final num body = 8.14; // num | Input number as post body
|
||||
try {
|
||||
final response = api.fakeOuterNumberSerialize(body);
|
||||
print(response);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling FakeApi->fakeOuterNumberSerialize: $e\n');
|
||||
}
|
||||
```
|
||||
@ -295,7 +295,7 @@ final String body = body_example; // String | Input string as post body
|
||||
try {
|
||||
final response = api.fakeOuterStringSerialize(body);
|
||||
print(response);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling FakeApi->fakeOuterStringSerialize: $e\n');
|
||||
}
|
||||
```
|
||||
@ -338,7 +338,7 @@ final OuterObjectWithEnumProperty outerObjectWithEnumProperty = ; // OuterObject
|
||||
try {
|
||||
final response = api.fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty);
|
||||
print(response);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling FakeApi->fakePropertyEnumIntegerSerialize: $e\n');
|
||||
}
|
||||
```
|
||||
@ -380,7 +380,7 @@ final MultipartFile body = BINARY_DATA_HERE; // MultipartFile | image to upload
|
||||
|
||||
try {
|
||||
api.testBodyWithBinary(body);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling FakeApi->testBodyWithBinary: $e\n');
|
||||
}
|
||||
```
|
||||
@ -422,7 +422,7 @@ final FileSchemaTestClass fileSchemaTestClass = ; // FileSchemaTestClass |
|
||||
|
||||
try {
|
||||
api.testBodyWithFileSchema(fileSchemaTestClass);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling FakeApi->testBodyWithFileSchema: $e\n');
|
||||
}
|
||||
```
|
||||
@ -463,7 +463,7 @@ final User user = ; // User |
|
||||
|
||||
try {
|
||||
api.testBodyWithQueryParams(query, user);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling FakeApi->testBodyWithQueryParams: $e\n');
|
||||
}
|
||||
```
|
||||
@ -507,7 +507,7 @@ final ModelClient modelClient = ; // ModelClient | client model
|
||||
try {
|
||||
final response = api.testClientModel(modelClient);
|
||||
print(response);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling FakeApi->testClientModel: $e\n');
|
||||
}
|
||||
```
|
||||
@ -565,7 +565,7 @@ final String callback = callback_example; // String | None
|
||||
|
||||
try {
|
||||
api.testEndpointParameters(number, double_, patternWithoutDelimiter, byte, integer, int32, int64, float, string, binary, date, dateTime, password, callback);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling FakeApi->testEndpointParameters: $e\n');
|
||||
}
|
||||
```
|
||||
@ -628,7 +628,7 @@ final String enumFormString = enumFormString_example; // String | Form parameter
|
||||
|
||||
try {
|
||||
api.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling FakeApi->testEnumParameters: $e\n');
|
||||
}
|
||||
```
|
||||
@ -683,7 +683,7 @@ final int int64Group = 789; // int | Integer in group parameters
|
||||
|
||||
try {
|
||||
api.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling FakeApi->testGroupParameters: $e\n');
|
||||
}
|
||||
```
|
||||
@ -730,7 +730,7 @@ final BuiltMap<String, String> requestBody = ; // BuiltMap<String, String> | req
|
||||
|
||||
try {
|
||||
api.testInlineAdditionalProperties(requestBody);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling FakeApi->testInlineAdditionalProperties: $e\n');
|
||||
}
|
||||
```
|
||||
@ -773,7 +773,7 @@ final String param2 = param2_example; // String | field2
|
||||
|
||||
try {
|
||||
api.testJsonFormData(param, param2);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling FakeApi->testJsonFormData: $e\n');
|
||||
}
|
||||
```
|
||||
@ -822,7 +822,7 @@ final BuiltMap<String, String> language = ; // BuiltMap<String, String> |
|
||||
|
||||
try {
|
||||
api.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling FakeApi->testQueryParameterCollectionFormat: $e\n');
|
||||
}
|
||||
```
|
||||
|
@ -33,7 +33,7 @@ final ModelClient modelClient = ; // ModelClient | client model
|
||||
try {
|
||||
final response = api.testClassname(modelClient);
|
||||
print(response);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling FakeClassnameTags123Api->testClassname: $e\n');
|
||||
}
|
||||
```
|
||||
|
@ -38,7 +38,7 @@ final Pet pet = ; // Pet | Pet object that needs to be added to the store
|
||||
|
||||
try {
|
||||
api.addPet(pet);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling PetApi->addPet: $e\n');
|
||||
}
|
||||
```
|
||||
@ -83,7 +83,7 @@ final String apiKey = apiKey_example; // String |
|
||||
|
||||
try {
|
||||
api.deletePet(petId, apiKey);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling PetApi->deletePet: $e\n');
|
||||
}
|
||||
```
|
||||
@ -129,7 +129,7 @@ final BuiltList<String> status = ; // BuiltList<String> | Status values that nee
|
||||
try {
|
||||
final response = api.findPetsByStatus(status);
|
||||
print(response);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling PetApi->findPetsByStatus: $e\n');
|
||||
}
|
||||
```
|
||||
@ -174,7 +174,7 @@ final BuiltSet<String> tags = ; // BuiltSet<String> | Tags to filter by
|
||||
try {
|
||||
final response = api.findPetsByTags(tags);
|
||||
print(response);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling PetApi->findPetsByTags: $e\n');
|
||||
}
|
||||
```
|
||||
@ -221,7 +221,7 @@ final int petId = 789; // int | ID of pet to return
|
||||
try {
|
||||
final response = api.getPetById(petId);
|
||||
print(response);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling PetApi->getPetById: $e\n');
|
||||
}
|
||||
```
|
||||
@ -265,7 +265,7 @@ final Pet pet = ; // Pet | Pet object that needs to be added to the store
|
||||
|
||||
try {
|
||||
api.updatePet(pet);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling PetApi->updatePet: $e\n');
|
||||
}
|
||||
```
|
||||
@ -311,7 +311,7 @@ final String status = status_example; // String | Updated status of the pet
|
||||
|
||||
try {
|
||||
api.updatePetWithForm(petId, name, status);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling PetApi->updatePetWithForm: $e\n');
|
||||
}
|
||||
```
|
||||
@ -360,7 +360,7 @@ final MultipartFile file = BINARY_DATA_HERE; // MultipartFile | file to upload
|
||||
try {
|
||||
final response = api.uploadFile(petId, additionalMetadata, file);
|
||||
print(response);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling PetApi->uploadFile: $e\n');
|
||||
}
|
||||
```
|
||||
@ -409,7 +409,7 @@ final String additionalMetadata = additionalMetadata_example; // String | Additi
|
||||
try {
|
||||
final response = api.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata);
|
||||
print(response);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling PetApi->uploadFileWithRequiredFile: $e\n');
|
||||
}
|
||||
```
|
||||
|
@ -31,7 +31,7 @@ final String orderId = orderId_example; // String | ID of the order that needs t
|
||||
|
||||
try {
|
||||
api.deleteOrder(orderId);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling StoreApi->deleteOrder: $e\n');
|
||||
}
|
||||
```
|
||||
@ -77,7 +77,7 @@ final api = Openapi().getStoreApi();
|
||||
try {
|
||||
final response = api.getInventory();
|
||||
print(response);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling StoreApi->getInventory: $e\n');
|
||||
}
|
||||
```
|
||||
@ -117,7 +117,7 @@ final int orderId = 789; // int | ID of pet that needs to be fetched
|
||||
try {
|
||||
final response = api.getOrderById(orderId);
|
||||
print(response);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling StoreApi->getOrderById: $e\n');
|
||||
}
|
||||
```
|
||||
@ -160,7 +160,7 @@ final Order order = ; // Order | order placed for purchasing the pet
|
||||
try {
|
||||
final response = api.placeOrder(order);
|
||||
print(response);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling StoreApi->placeOrder: $e\n');
|
||||
}
|
||||
```
|
||||
|
@ -35,7 +35,7 @@ final User user = ; // User | Created user object
|
||||
|
||||
try {
|
||||
api.createUser(user);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling UserApi->createUser: $e\n');
|
||||
}
|
||||
```
|
||||
@ -77,7 +77,7 @@ final BuiltList<User> user = ; // BuiltList<User> | List of user object
|
||||
|
||||
try {
|
||||
api.createUsersWithArrayInput(user);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling UserApi->createUsersWithArrayInput: $e\n');
|
||||
}
|
||||
```
|
||||
@ -119,7 +119,7 @@ final BuiltList<User> user = ; // BuiltList<User> | List of user object
|
||||
|
||||
try {
|
||||
api.createUsersWithListInput(user);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling UserApi->createUsersWithListInput: $e\n');
|
||||
}
|
||||
```
|
||||
@ -161,7 +161,7 @@ final String username = username_example; // String | The name that needs to be
|
||||
|
||||
try {
|
||||
api.deleteUser(username);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling UserApi->deleteUser: $e\n');
|
||||
}
|
||||
```
|
||||
@ -204,7 +204,7 @@ final String username = username_example; // String | The name that needs to be
|
||||
try {
|
||||
final response = api.getUserByName(username);
|
||||
print(response);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling UserApi->getUserByName: $e\n');
|
||||
}
|
||||
```
|
||||
@ -248,7 +248,7 @@ final String password = password_example; // String | The password for login in
|
||||
try {
|
||||
final response = api.loginUser(username, password);
|
||||
print(response);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling UserApi->loginUser: $e\n');
|
||||
}
|
||||
```
|
||||
@ -290,7 +290,7 @@ final api = Openapi().getUserApi();
|
||||
|
||||
try {
|
||||
api.logoutUser();
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling UserApi->logoutUser: $e\n');
|
||||
}
|
||||
```
|
||||
@ -330,7 +330,7 @@ final User user = ; // User | Updated user object
|
||||
|
||||
try {
|
||||
api.updateUser(username, user);
|
||||
} catch on DioError (e) {
|
||||
} catch on DioException (e) {
|
||||
print('Exception when calling UserApi->updateUser: $e\n');
|
||||
}
|
||||
```
|
||||
|
@ -30,7 +30,7 @@ class AnotherFakeApi {
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [ModelClient] as data
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<ModelClient>> call123testSpecialTags({
|
||||
required ModelClient modelClient,
|
||||
CancelToken? cancelToken,
|
||||
@ -61,12 +61,12 @@ class AnotherFakeApi {
|
||||
_bodyData = _serializers.serialize(modelClient, specifiedType: _type);
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -91,10 +91,10 @@ class AnotherFakeApi {
|
||||
) as ModelClient;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
|
@ -29,7 +29,7 @@ class DefaultApi {
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [FooGetDefaultResponse] as data
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<FooGetDefaultResponse>> fooGet({
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
@ -69,10 +69,10 @@ class DefaultApi {
|
||||
) as FooGetDefaultResponse;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
|
@ -41,7 +41,7 @@ class FakeApi {
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [FakeBigDecimalMap200Response] as data
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<FakeBigDecimalMap200Response>> fakeBigDecimalMap({
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
@ -81,10 +81,10 @@ class FakeApi {
|
||||
) as FakeBigDecimalMap200Response;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -114,7 +114,7 @@ class FakeApi {
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [HealthCheckResult] as data
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<HealthCheckResult>> fakeHealthGet({
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
@ -154,10 +154,10 @@ class FakeApi {
|
||||
) as HealthCheckResult;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -190,7 +190,7 @@ class FakeApi {
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future]
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<void>> fakeHttpSignatureTest({
|
||||
required Pet pet,
|
||||
String? query1,
|
||||
@ -234,13 +234,13 @@ class FakeApi {
|
||||
_bodyData = _serializers.serialize(pet, specifiedType: _type);
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
queryParameters: _queryParameters,
|
||||
),
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -272,7 +272,7 @@ class FakeApi {
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [bool] as data
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<bool>> fakeOuterBooleanSerialize({
|
||||
bool? body,
|
||||
CancelToken? cancelToken,
|
||||
@ -302,12 +302,12 @@ class FakeApi {
|
||||
_bodyData = body;
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -329,10 +329,10 @@ class FakeApi {
|
||||
_responseData = rawResponse == null ? null : rawResponse as bool;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -363,7 +363,7 @@ class FakeApi {
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [OuterComposite] as data
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<OuterComposite>> fakeOuterCompositeSerialize({
|
||||
OuterComposite? outerComposite,
|
||||
CancelToken? cancelToken,
|
||||
@ -394,12 +394,12 @@ class FakeApi {
|
||||
_bodyData = outerComposite == null ? null : _serializers.serialize(outerComposite, specifiedType: _type);
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -424,10 +424,10 @@ class FakeApi {
|
||||
) as OuterComposite;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -458,7 +458,7 @@ class FakeApi {
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [num] as data
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<num>> fakeOuterNumberSerialize({
|
||||
num? body,
|
||||
CancelToken? cancelToken,
|
||||
@ -488,12 +488,12 @@ class FakeApi {
|
||||
_bodyData = body;
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -515,10 +515,10 @@ class FakeApi {
|
||||
_responseData = rawResponse == null ? null : rawResponse as num;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -549,7 +549,7 @@ class FakeApi {
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [String] as data
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<String>> fakeOuterStringSerialize({
|
||||
String? body,
|
||||
CancelToken? cancelToken,
|
||||
@ -579,12 +579,12 @@ class FakeApi {
|
||||
_bodyData = body;
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -606,10 +606,10 @@ class FakeApi {
|
||||
_responseData = rawResponse == null ? null : rawResponse as String;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -640,7 +640,7 @@ class FakeApi {
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [OuterObjectWithEnumProperty] as data
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<OuterObjectWithEnumProperty>> fakePropertyEnumIntegerSerialize({
|
||||
required OuterObjectWithEnumProperty outerObjectWithEnumProperty,
|
||||
CancelToken? cancelToken,
|
||||
@ -671,12 +671,12 @@ class FakeApi {
|
||||
_bodyData = _serializers.serialize(outerObjectWithEnumProperty, specifiedType: _type);
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -701,10 +701,10 @@ class FakeApi {
|
||||
) as OuterObjectWithEnumProperty;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -735,7 +735,7 @@ class FakeApi {
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future]
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<void>> testBodyWithBinary({
|
||||
MultipartFile? body,
|
||||
CancelToken? cancelToken,
|
||||
@ -765,12 +765,12 @@ class FakeApi {
|
||||
_bodyData = body?.finalize();
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -801,7 +801,7 @@ class FakeApi {
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future]
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<void>> testBodyWithFileSchema({
|
||||
required FileSchemaTestClass fileSchemaTestClass,
|
||||
CancelToken? cancelToken,
|
||||
@ -832,12 +832,12 @@ class FakeApi {
|
||||
_bodyData = _serializers.serialize(fileSchemaTestClass, specifiedType: _type);
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -869,7 +869,7 @@ class FakeApi {
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future]
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<void>> testBodyWithQueryParams({
|
||||
required String query,
|
||||
required User user,
|
||||
@ -905,13 +905,13 @@ class FakeApi {
|
||||
_bodyData = _serializers.serialize(user, specifiedType: _type);
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
queryParameters: _queryParameters,
|
||||
),
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -943,7 +943,7 @@ class FakeApi {
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [ModelClient] as data
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<ModelClient>> testClientModel({
|
||||
required ModelClient modelClient,
|
||||
CancelToken? cancelToken,
|
||||
@ -974,12 +974,12 @@ class FakeApi {
|
||||
_bodyData = _serializers.serialize(modelClient, specifiedType: _type);
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -1004,10 +1004,10 @@ class FakeApi {
|
||||
) as ModelClient;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -1051,7 +1051,7 @@ class FakeApi {
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future]
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<void>> testEndpointParameters({
|
||||
required num number,
|
||||
required double double_,
|
||||
@ -1115,12 +1115,12 @@ class FakeApi {
|
||||
};
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -1159,7 +1159,7 @@ class FakeApi {
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future]
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<void>> testEnumParameters({
|
||||
BuiltList<String>? enumHeaderStringArray,
|
||||
String? enumHeaderString = '-efg',
|
||||
@ -1210,13 +1210,13 @@ class FakeApi {
|
||||
};
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
queryParameters: _queryParameters,
|
||||
),
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -1253,7 +1253,7 @@ class FakeApi {
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future]
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<void>> testGroupParameters({
|
||||
required int requiredStringGroup,
|
||||
required bool requiredBooleanGroup,
|
||||
@ -1321,7 +1321,7 @@ class FakeApi {
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future]
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<void>> testInlineAdditionalProperties({
|
||||
required BuiltMap<String, String> requestBody,
|
||||
CancelToken? cancelToken,
|
||||
@ -1352,12 +1352,12 @@ class FakeApi {
|
||||
_bodyData = _serializers.serialize(requestBody, specifiedType: _type);
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -1389,7 +1389,7 @@ class FakeApi {
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future]
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<void>> testJsonFormData({
|
||||
required String param,
|
||||
required String param2,
|
||||
@ -1423,12 +1423,12 @@ class FakeApi {
|
||||
};
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -1465,7 +1465,7 @@ class FakeApi {
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future]
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<void>> testQueryParameterCollectionFormat({
|
||||
required BuiltList<String> pipe,
|
||||
required BuiltList<String> ioutil,
|
||||
|
@ -30,7 +30,7 @@ class FakeClassnameTags123Api {
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [ModelClient] as data
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<ModelClient>> testClassname({
|
||||
required ModelClient modelClient,
|
||||
CancelToken? cancelToken,
|
||||
@ -68,12 +68,12 @@ class FakeClassnameTags123Api {
|
||||
_bodyData = _serializers.serialize(modelClient, specifiedType: _type);
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -98,10 +98,10 @@ class FakeClassnameTags123Api {
|
||||
) as ModelClient;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
|
@ -33,7 +33,7 @@ class PetApi {
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future]
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<void>> addPet({
|
||||
required Pet pet,
|
||||
CancelToken? cancelToken,
|
||||
@ -69,12 +69,12 @@ class PetApi {
|
||||
_bodyData = _serializers.serialize(pet, specifiedType: _type);
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -106,7 +106,7 @@ class PetApi {
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future]
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<void>> deletePet({
|
||||
required int petId,
|
||||
String? apiKey,
|
||||
@ -160,7 +160,7 @@ class PetApi {
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [BuiltList<Pet>] as data
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<BuiltList<Pet>>> findPetsByStatus({
|
||||
@Deprecated('status is deprecated') required BuiltList<String> status,
|
||||
CancelToken? cancelToken,
|
||||
@ -211,10 +211,10 @@ class PetApi {
|
||||
) as BuiltList<Pet>;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -245,7 +245,7 @@ class PetApi {
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [BuiltSet<Pet>] as data
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
@Deprecated('This operation has been deprecated')
|
||||
Future<Response<BuiltSet<Pet>>> findPetsByTags({
|
||||
required BuiltSet<String> tags,
|
||||
@ -297,10 +297,10 @@ class PetApi {
|
||||
) as BuiltSet<Pet>;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -331,7 +331,7 @@ class PetApi {
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [Pet] as data
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<Pet>> getPetById({
|
||||
required int petId,
|
||||
CancelToken? cancelToken,
|
||||
@ -379,10 +379,10 @@ class PetApi {
|
||||
) as Pet;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -413,7 +413,7 @@ class PetApi {
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future]
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<void>> updatePet({
|
||||
required Pet pet,
|
||||
CancelToken? cancelToken,
|
||||
@ -449,12 +449,12 @@ class PetApi {
|
||||
_bodyData = _serializers.serialize(pet, specifiedType: _type);
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -487,7 +487,7 @@ class PetApi {
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future]
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<void>> updatePetWithForm({
|
||||
required int petId,
|
||||
String? name,
|
||||
@ -527,12 +527,12 @@ class PetApi {
|
||||
};
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -565,7 +565,7 @@ class PetApi {
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [ApiResponse] as data
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<ApiResponse>> uploadFile({
|
||||
required int petId,
|
||||
String? additionalMetadata,
|
||||
@ -605,12 +605,12 @@ class PetApi {
|
||||
});
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -635,10 +635,10 @@ class PetApi {
|
||||
) as ApiResponse;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -671,7 +671,7 @@ class PetApi {
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [ApiResponse] as data
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<ApiResponse>> uploadFileWithRequiredFile({
|
||||
required int petId,
|
||||
required MultipartFile requiredFile,
|
||||
@ -711,12 +711,12 @@ class PetApi {
|
||||
});
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -741,10 +741,10 @@ class PetApi {
|
||||
) as ApiResponse;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
|
@ -32,7 +32,7 @@ class StoreApi {
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future]
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<void>> deleteOrder({
|
||||
required String orderId,
|
||||
CancelToken? cancelToken,
|
||||
@ -78,7 +78,7 @@ class StoreApi {
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [BuiltMap<String, int>] as data
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<BuiltMap<String, int>>> getInventory({
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
@ -125,10 +125,10 @@ class StoreApi {
|
||||
) as BuiltMap<String, int>;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -159,7 +159,7 @@ class StoreApi {
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [Order] as data
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<Order>> getOrderById({
|
||||
required int orderId,
|
||||
CancelToken? cancelToken,
|
||||
@ -200,10 +200,10 @@ class StoreApi {
|
||||
) as Order;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -234,7 +234,7 @@ class StoreApi {
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [Order] as data
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<Order>> placeOrder({
|
||||
required Order order,
|
||||
CancelToken? cancelToken,
|
||||
@ -265,12 +265,12 @@ class StoreApi {
|
||||
_bodyData = _serializers.serialize(order, specifiedType: _type);
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -295,10 +295,10 @@ class StoreApi {
|
||||
) as Order;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
|
@ -32,7 +32,7 @@ class UserApi {
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future]
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<void>> createUser({
|
||||
required User user,
|
||||
CancelToken? cancelToken,
|
||||
@ -63,12 +63,12 @@ class UserApi {
|
||||
_bodyData = _serializers.serialize(user, specifiedType: _type);
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -99,7 +99,7 @@ class UserApi {
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future]
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<void>> createUsersWithArrayInput({
|
||||
required BuiltList<User> user,
|
||||
CancelToken? cancelToken,
|
||||
@ -130,12 +130,12 @@ class UserApi {
|
||||
_bodyData = _serializers.serialize(user, specifiedType: _type);
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -166,7 +166,7 @@ class UserApi {
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future]
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<void>> createUsersWithListInput({
|
||||
required BuiltList<User> user,
|
||||
CancelToken? cancelToken,
|
||||
@ -197,12 +197,12 @@ class UserApi {
|
||||
_bodyData = _serializers.serialize(user, specifiedType: _type);
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -233,7 +233,7 @@ class UserApi {
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future]
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<void>> deleteUser({
|
||||
required String username,
|
||||
CancelToken? cancelToken,
|
||||
@ -280,7 +280,7 @@ class UserApi {
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [User] as data
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<User>> getUserByName({
|
||||
required String username,
|
||||
CancelToken? cancelToken,
|
||||
@ -321,10 +321,10 @@ class UserApi {
|
||||
) as User;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -356,7 +356,7 @@ class UserApi {
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [String] as data
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<String>> loginUser({
|
||||
required String username,
|
||||
required String password,
|
||||
@ -401,10 +401,10 @@ class UserApi {
|
||||
_responseData = rawResponse == null ? null : rawResponse as String;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
@ -434,7 +434,7 @@ class UserApi {
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future]
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<void>> logoutUser({
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
@ -481,7 +481,7 @@ class UserApi {
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future]
|
||||
/// Throws [DioError] if API call or serialization fails
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<void>> updateUser({
|
||||
required String username,
|
||||
required User user,
|
||||
@ -513,12 +513,12 @@ class UserApi {
|
||||
_bodyData = _serializers.serialize(user, specifiedType: _type);
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioError(
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioErrorType.unknown,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
|
@ -0,0 +1,141 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_element
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
|
||||
part 'cat_all_of.g.dart';
|
||||
|
||||
/// CatAllOf
|
||||
///
|
||||
/// Properties:
|
||||
/// * [declawed]
|
||||
@BuiltValue(instantiable: false)
|
||||
abstract class CatAllOf {
|
||||
@BuiltValueField(wireName: r'declawed')
|
||||
bool? get declawed;
|
||||
|
||||
@BuiltValueSerializer(custom: true)
|
||||
static Serializer<CatAllOf> get serializer => _$CatAllOfSerializer();
|
||||
}
|
||||
|
||||
class _$CatAllOfSerializer implements PrimitiveSerializer<CatAllOf> {
|
||||
@override
|
||||
final Iterable<Type> types = const [CatAllOf];
|
||||
|
||||
@override
|
||||
final String wireName = r'CatAllOf';
|
||||
|
||||
Iterable<Object?> _serializeProperties(
|
||||
Serializers serializers,
|
||||
CatAllOf object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) sync* {
|
||||
if (object.declawed != null) {
|
||||
yield r'declawed';
|
||||
yield serializers.serialize(
|
||||
object.declawed,
|
||||
specifiedType: const FullType(bool),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Object serialize(
|
||||
Serializers serializers,
|
||||
CatAllOf object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
return _serializeProperties(serializers, object, specifiedType: specifiedType).toList();
|
||||
}
|
||||
|
||||
@override
|
||||
CatAllOf deserialize(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
return serializers.deserialize(serialized, specifiedType: FullType($CatAllOf)) as $CatAllOf;
|
||||
}
|
||||
}
|
||||
|
||||
/// a concrete implementation of [CatAllOf], since [CatAllOf] is not instantiable
|
||||
@BuiltValue(instantiable: true)
|
||||
abstract class $CatAllOf implements CatAllOf, Built<$CatAllOf, $CatAllOfBuilder> {
|
||||
$CatAllOf._();
|
||||
|
||||
factory $CatAllOf([void Function($CatAllOfBuilder)? updates]) = _$$CatAllOf;
|
||||
|
||||
@BuiltValueHook(initializeBuilder: true)
|
||||
static void _defaults($CatAllOfBuilder b) => b;
|
||||
|
||||
@BuiltValueSerializer(custom: true)
|
||||
static Serializer<$CatAllOf> get serializer => _$$CatAllOfSerializer();
|
||||
}
|
||||
|
||||
class _$$CatAllOfSerializer implements PrimitiveSerializer<$CatAllOf> {
|
||||
@override
|
||||
final Iterable<Type> types = const [$CatAllOf, _$$CatAllOf];
|
||||
|
||||
@override
|
||||
final String wireName = r'$CatAllOf';
|
||||
|
||||
@override
|
||||
Object serialize(
|
||||
Serializers serializers,
|
||||
$CatAllOf object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
return serializers.serialize(object, specifiedType: FullType(CatAllOf))!;
|
||||
}
|
||||
|
||||
void _deserializeProperties(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
required List<Object?> serializedList,
|
||||
required CatAllOfBuilder result,
|
||||
required List<Object?> unhandled,
|
||||
}) {
|
||||
for (var i = 0; i < serializedList.length; i += 2) {
|
||||
final key = serializedList[i] as String;
|
||||
final value = serializedList[i + 1];
|
||||
switch (key) {
|
||||
case r'declawed':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(bool),
|
||||
) as bool;
|
||||
result.declawed = valueDes;
|
||||
break;
|
||||
default:
|
||||
unhandled.add(key);
|
||||
unhandled.add(value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
$CatAllOf deserialize(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
final result = $CatAllOfBuilder();
|
||||
final serializedList = (serialized as Iterable<Object?>).toList();
|
||||
final unhandled = <Object?>[];
|
||||
_deserializeProperties(
|
||||
serializers,
|
||||
serialized,
|
||||
specifiedType: specifiedType,
|
||||
serializedList: serializedList,
|
||||
unhandled: unhandled,
|
||||
result: result,
|
||||
);
|
||||
return result.build();
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,141 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_element
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
|
||||
part 'dog_all_of.g.dart';
|
||||
|
||||
/// DogAllOf
|
||||
///
|
||||
/// Properties:
|
||||
/// * [breed]
|
||||
@BuiltValue(instantiable: false)
|
||||
abstract class DogAllOf {
|
||||
@BuiltValueField(wireName: r'breed')
|
||||
String? get breed;
|
||||
|
||||
@BuiltValueSerializer(custom: true)
|
||||
static Serializer<DogAllOf> get serializer => _$DogAllOfSerializer();
|
||||
}
|
||||
|
||||
class _$DogAllOfSerializer implements PrimitiveSerializer<DogAllOf> {
|
||||
@override
|
||||
final Iterable<Type> types = const [DogAllOf];
|
||||
|
||||
@override
|
||||
final String wireName = r'DogAllOf';
|
||||
|
||||
Iterable<Object?> _serializeProperties(
|
||||
Serializers serializers,
|
||||
DogAllOf object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) sync* {
|
||||
if (object.breed != null) {
|
||||
yield r'breed';
|
||||
yield serializers.serialize(
|
||||
object.breed,
|
||||
specifiedType: const FullType(String),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Object serialize(
|
||||
Serializers serializers,
|
||||
DogAllOf object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
return _serializeProperties(serializers, object, specifiedType: specifiedType).toList();
|
||||
}
|
||||
|
||||
@override
|
||||
DogAllOf deserialize(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
return serializers.deserialize(serialized, specifiedType: FullType($DogAllOf)) as $DogAllOf;
|
||||
}
|
||||
}
|
||||
|
||||
/// a concrete implementation of [DogAllOf], since [DogAllOf] is not instantiable
|
||||
@BuiltValue(instantiable: true)
|
||||
abstract class $DogAllOf implements DogAllOf, Built<$DogAllOf, $DogAllOfBuilder> {
|
||||
$DogAllOf._();
|
||||
|
||||
factory $DogAllOf([void Function($DogAllOfBuilder)? updates]) = _$$DogAllOf;
|
||||
|
||||
@BuiltValueHook(initializeBuilder: true)
|
||||
static void _defaults($DogAllOfBuilder b) => b;
|
||||
|
||||
@BuiltValueSerializer(custom: true)
|
||||
static Serializer<$DogAllOf> get serializer => _$$DogAllOfSerializer();
|
||||
}
|
||||
|
||||
class _$$DogAllOfSerializer implements PrimitiveSerializer<$DogAllOf> {
|
||||
@override
|
||||
final Iterable<Type> types = const [$DogAllOf, _$$DogAllOf];
|
||||
|
||||
@override
|
||||
final String wireName = r'$DogAllOf';
|
||||
|
||||
@override
|
||||
Object serialize(
|
||||
Serializers serializers,
|
||||
$DogAllOf object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
return serializers.serialize(object, specifiedType: FullType(DogAllOf))!;
|
||||
}
|
||||
|
||||
void _deserializeProperties(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
required List<Object?> serializedList,
|
||||
required DogAllOfBuilder result,
|
||||
required List<Object?> unhandled,
|
||||
}) {
|
||||
for (var i = 0; i < serializedList.length; i += 2) {
|
||||
final key = serializedList[i] as String;
|
||||
final value = serializedList[i + 1];
|
||||
switch (key) {
|
||||
case r'breed':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(String),
|
||||
) as String;
|
||||
result.breed = valueDes;
|
||||
break;
|
||||
default:
|
||||
unhandled.add(key);
|
||||
unhandled.add(value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
$DogAllOf deserialize(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
final result = $DogAllOfBuilder();
|
||||
final serializedList = (serialized as Iterable<Object?>).toList();
|
||||
final unhandled = <Object?>[];
|
||||
_deserializeProperties(
|
||||
serializers,
|
||||
serialized,
|
||||
specifiedType: specifiedType,
|
||||
serializedList: serializedList,
|
||||
unhandled: unhandled,
|
||||
result: result,
|
||||
);
|
||||
return result.build();
|
||||
}
|
||||
}
|
||||
|
@ -7,7 +7,7 @@ environment:
|
||||
sdk: '>=2.15.0 <3.0.0'
|
||||
|
||||
dependencies:
|
||||
dio: '^5.0.0'
|
||||
dio: '^5.2.0'
|
||||
one_of: '>=1.5.0 <2.0.0'
|
||||
one_of_serializer: '>=1.5.0 <2.0.0'
|
||||
built_value: '>=8.4.0 <9.0.0'
|
||||
|
@ -10,7 +10,7 @@ environment:
|
||||
dev_dependencies:
|
||||
built_collection: 5.1.1
|
||||
built_value: 8.4.3
|
||||
dio: 5.0.0
|
||||
dio: 5.2.1
|
||||
http_mock_adapter: 0.4.2
|
||||
mockito: 5.2.0
|
||||
openapi:
|
||||
|
@ -264,7 +264,7 @@ void main() {
|
||||
.build(),
|
||||
const FullType(Cat),
|
||||
),
|
||||
'{"className":"cat","color":"black","declawed":false}',
|
||||
'{"color":"black","declawed":false,"className":"cat"}',
|
||||
);
|
||||
});
|
||||
});
|
||||
|
@ -0,0 +1,15 @@
|
||||
# openapi.model.CatAllOf
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**declawed** | **bool** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -0,0 +1,15 @@
|
||||
# openapi.model.DogAllOf
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**breed** | **String** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -0,0 +1,118 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.12
|
||||
|
||||
// ignore_for_file: unused_element, unused_import
|
||||
// ignore_for_file: always_put_required_named_parameters_first
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: lines_longer_than_80_chars
|
||||
|
||||
part of openapi.api;
|
||||
|
||||
class CatAllOf {
|
||||
/// Returns a new [CatAllOf] instance.
|
||||
CatAllOf({
|
||||
this.declawed,
|
||||
});
|
||||
|
||||
///
|
||||
/// Please note: This property should have been non-nullable! Since the specification file
|
||||
/// does not include a default value (using the "default:" property), however, the generated
|
||||
/// source code must fall back to having a nullable type.
|
||||
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||
///
|
||||
bool? declawed;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is CatAllOf &&
|
||||
other.declawed == declawed;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(declawed == null ? 0 : declawed!.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'CatAllOf[declawed=$declawed]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
if (this.declawed != null) {
|
||||
json[r'declawed'] = this.declawed;
|
||||
} else {
|
||||
json[r'declawed'] = null;
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [CatAllOf] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static CatAllOf? fromJson(dynamic value) {
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
// Ensure that the map contains the required keys.
|
||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
||||
// Note 2: this code is stripped in release mode!
|
||||
assert(() {
|
||||
requiredKeys.forEach((key) {
|
||||
assert(json.containsKey(key), 'Required key "CatAllOf[$key]" is missing from JSON.');
|
||||
assert(json[key] != null, 'Required key "CatAllOf[$key]" has a null value in JSON.');
|
||||
});
|
||||
return true;
|
||||
}());
|
||||
|
||||
return CatAllOf(
|
||||
declawed: mapValueOfType<bool>(json, r'declawed'),
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<CatAllOf> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <CatAllOf>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = CatAllOf.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, CatAllOf> mapFromJson(dynamic json) {
|
||||
final map = <String, CatAllOf>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = CatAllOf.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of CatAllOf-objects as value to a dart map
|
||||
static Map<String, List<CatAllOf>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<CatAllOf>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = CatAllOf.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
};
|
||||
}
|
||||
|
@ -0,0 +1,118 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.12
|
||||
|
||||
// ignore_for_file: unused_element, unused_import
|
||||
// ignore_for_file: always_put_required_named_parameters_first
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: lines_longer_than_80_chars
|
||||
|
||||
part of openapi.api;
|
||||
|
||||
class DogAllOf {
|
||||
/// Returns a new [DogAllOf] instance.
|
||||
DogAllOf({
|
||||
this.breed,
|
||||
});
|
||||
|
||||
///
|
||||
/// Please note: This property should have been non-nullable! Since the specification file
|
||||
/// does not include a default value (using the "default:" property), however, the generated
|
||||
/// source code must fall back to having a nullable type.
|
||||
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||
///
|
||||
String? breed;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is DogAllOf &&
|
||||
other.breed == breed;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(breed == null ? 0 : breed!.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'DogAllOf[breed=$breed]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
if (this.breed != null) {
|
||||
json[r'breed'] = this.breed;
|
||||
} else {
|
||||
json[r'breed'] = null;
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [DogAllOf] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static DogAllOf? fromJson(dynamic value) {
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
// Ensure that the map contains the required keys.
|
||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
||||
// Note 2: this code is stripped in release mode!
|
||||
assert(() {
|
||||
requiredKeys.forEach((key) {
|
||||
assert(json.containsKey(key), 'Required key "DogAllOf[$key]" is missing from JSON.');
|
||||
assert(json[key] != null, 'Required key "DogAllOf[$key]" has a null value in JSON.');
|
||||
});
|
||||
return true;
|
||||
}());
|
||||
|
||||
return DogAllOf(
|
||||
breed: mapValueOfType<String>(json, r'breed'),
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<DogAllOf> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <DogAllOf>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = DogAllOf.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, DogAllOf> mapFromJson(dynamic json) {
|
||||
final map = <String, DogAllOf>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = DogAllOf.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of DogAllOf-objects as value to a dart map
|
||||
static Map<String, List<DogAllOf>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<DogAllOf>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = DogAllOf.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
};
|
||||
}
|
||||
|
@ -0,0 +1,27 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.12
|
||||
|
||||
// ignore_for_file: unused_element, unused_import
|
||||
// ignore_for_file: always_put_required_named_parameters_first
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: lines_longer_than_80_chars
|
||||
|
||||
import 'package:openapi/api.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
// tests for CatAllOf
|
||||
void main() {
|
||||
// final instance = CatAllOf();
|
||||
|
||||
group('test CatAllOf', () {
|
||||
// bool declawed
|
||||
test('to test the property `declawed`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.12
|
||||
|
||||
// ignore_for_file: unused_element, unused_import
|
||||
// ignore_for_file: always_put_required_named_parameters_first
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: lines_longer_than_80_chars
|
||||
|
||||
import 'package:openapi/api.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
// tests for DogAllOf
|
||||
void main() {
|
||||
// final instance = DogAllOf();
|
||||
|
||||
group('test DogAllOf', () {
|
||||
// String breed
|
||||
test('to test the property `breed`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user