[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:
Rexios 2023-06-15 12:16:39 -04:00 committed by GitHub
parent 747d9d9b51
commit 95cefaeecd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
66 changed files with 1170 additions and 400 deletions

View File

@ -73,7 +73,7 @@ try {
{{#returnType}} {{#returnType}}
print(response); print(response);
{{/returnType}} {{/returnType}}
} catch on DioError (e) { } catch on DioException (e) {
print("Exception when calling {{classname}}->{{operationId}}: $e\n"); print("Exception when calling {{classname}}->{{operationId}}: $e\n");
} }
{{/-first}}{{/operation}}{{/operations}}{{/-first}}{{/apis}}{{/apiInfo}} {{/-first}}{{/operation}}{{/operations}}{{/-first}}{{/apis}}{{/apiInfo}}

View File

@ -30,7 +30,7 @@ class {{classname}} {
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future]{{#returnType}} containing a [Response] with a [{{{.}}}] as data{{/returnType}} /// 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}} {{#externalDocs}}
/// {{description}} /// {{description}}
/// Also see [{{summary}} Documentation]({{url}}) /// Also see [{{summary}} Documentation]({{url}})
@ -93,13 +93,13 @@ class {{classname}} {
try { try {
{{#includeLibraryTemplate}}api/serialize{{/includeLibraryTemplate}} {{#includeLibraryTemplate}}api/serialize{{/includeLibraryTemplate}}
} catch(error, stackTrace) { } catch(error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _options.compose( requestOptions: _options.compose(
_dio.options, _dio.options,
_path,{{#hasQueryParams}} _path,{{#hasQueryParams}}
queryParameters: _queryParameters,{{/hasQueryParams}} queryParameters: _queryParameters,{{/hasQueryParams}}
), ),
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );
@ -121,10 +121,10 @@ class {{classname}} {
try { try {
{{#includeLibraryTemplate}}api/deserialize{{/includeLibraryTemplate}} {{#includeLibraryTemplate}}api/deserialize{{/includeLibraryTemplate}}
} catch (error, stackTrace) { } catch (error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _response.requestOptions, requestOptions: _response.requestOptions,
response: _response, response: _response,
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );

View File

@ -55,7 +55,7 @@ try {
{{#returnType}} {{#returnType}}
print(response); print(response);
{{/returnType}} {{/returnType}}
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling {{classname}}->{{operationId}}: $e\n'); print('Exception when calling {{classname}}->{{operationId}}: $e\n');
} }
``` ```

View File

@ -13,7 +13,7 @@ environment:
sdk: '>=2.15.0 <3.0.0' sdk: '>=2.15.0 <3.0.0'
dependencies: dependencies:
dio: '^5.0.0' dio: '^5.2.0'
{{#useBuiltValue}} {{#useBuiltValue}}
one_of: '>=1.5.0 <2.0.0' one_of: '>=1.5.0 <2.0.0'
one_of_serializer: '>=1.5.0 <2.0.0' one_of_serializer: '>=1.5.0 <2.0.0'

View File

@ -51,7 +51,7 @@ final api = Openapi().getDefaultApi();
try { try {
final response = await api.rootGet(); final response = await api.rootGet();
print(response); print(response);
} catch on DioError (e) { } catch on DioException (e) {
print("Exception when calling DefaultApi->rootGet: $e\n"); print("Exception when calling DefaultApi->rootGet: $e\n");
} }

View File

@ -26,7 +26,7 @@ final api = Openapi().getDefaultApi();
try { try {
final response = api.rootGet(); final response = api.rootGet();
print(response); print(response);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling DefaultApi->rootGet: $e\n'); print('Exception when calling DefaultApi->rootGet: $e\n');
} }
``` ```

View File

@ -29,7 +29,7 @@ class DefaultApi {
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] containing a [Response] with a [Fruit] as data /// 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({ Future<Response<Fruit>> rootGet({
CancelToken? cancelToken, CancelToken? cancelToken,
Map<String, dynamic>? headers, Map<String, dynamic>? headers,
@ -69,10 +69,10 @@ class DefaultApi {
) as Fruit; ) as Fruit;
} catch (error, stackTrace) { } catch (error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _response.requestOptions, requestOptions: _response.requestOptions,
response: _response, response: _response,
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );

View File

@ -7,7 +7,7 @@ environment:
sdk: '>=2.15.0 <3.0.0' sdk: '>=2.15.0 <3.0.0'
dependencies: dependencies:
dio: '^5.0.0' dio: '^5.2.0'
one_of: '>=1.5.0 <2.0.0' one_of: '>=1.5.0 <2.0.0'
one_of_serializer: '>=1.5.0 <2.0.0' one_of_serializer: '>=1.5.0 <2.0.0'
built_value: '>=8.4.0 <9.0.0' built_value: '>=8.4.0 <9.0.0'

View File

@ -53,7 +53,7 @@ final BarCreate barCreate = ; // BarCreate |
try { try {
final response = await api.createBar(barCreate); final response = await api.createBar(barCreate);
print(response); print(response);
} catch on DioError (e) { } catch on DioException (e) {
print("Exception when calling BarApi->createBar: $e\n"); print("Exception when calling BarApi->createBar: $e\n");
} }

View File

@ -27,7 +27,7 @@ final BarCreate barCreate = ; // BarCreate |
try { try {
final response = api.createBar(barCreate); final response = api.createBar(barCreate);
print(response); print(response);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling BarApi->createBar: $e\n'); print('Exception when calling BarApi->createBar: $e\n');
} }
``` ```

View File

@ -28,7 +28,7 @@ final Foo foo = ; // Foo | The Foo to be created
try { try {
final response = api.createFoo(foo); final response = api.createFoo(foo);
print(response); print(response);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling FooApi->createFoo: $e\n'); print('Exception when calling FooApi->createFoo: $e\n');
} }
``` ```
@ -68,7 +68,7 @@ final api = Openapi().getFooApi();
try { try {
final response = api.getAllFoos(); final response = api.getAllFoos();
print(response); print(response);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling FooApi->getAllFoos: $e\n'); print('Exception when calling FooApi->getAllFoos: $e\n');
} }
``` ```

View File

@ -31,7 +31,7 @@ class BarApi {
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] containing a [Response] with a [Bar] as data /// 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({ Future<Response<Bar>> createBar({
required BarCreate barCreate, required BarCreate barCreate,
CancelToken? cancelToken, CancelToken? cancelToken,
@ -62,12 +62,12 @@ class BarApi {
_bodyData = _serializers.serialize(barCreate, specifiedType: _type); _bodyData = _serializers.serialize(barCreate, specifiedType: _type);
} catch(error, stackTrace) { } catch(error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _options.compose( requestOptions: _options.compose(
_dio.options, _dio.options,
_path, _path,
), ),
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );
@ -92,10 +92,10 @@ class BarApi {
) as Bar; ) as Bar;
} catch (error, stackTrace) { } catch (error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _response.requestOptions, requestOptions: _response.requestOptions,
response: _response, response: _response,
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );

View File

@ -32,7 +32,7 @@ class FooApi {
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] containing a [Response] with a [FooRefOrValue] as data /// 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({ Future<Response<FooRefOrValue>> createFoo({
Foo? foo, Foo? foo,
CancelToken? cancelToken, CancelToken? cancelToken,
@ -63,12 +63,12 @@ class FooApi {
_bodyData = foo == null ? null : _serializers.serialize(foo, specifiedType: _type); _bodyData = foo == null ? null : _serializers.serialize(foo, specifiedType: _type);
} catch(error, stackTrace) { } catch(error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _options.compose( requestOptions: _options.compose(
_dio.options, _dio.options,
_path, _path,
), ),
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );
@ -93,10 +93,10 @@ class FooApi {
) as FooRefOrValue; ) as FooRefOrValue;
} catch (error, stackTrace) { } catch (error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _response.requestOptions, requestOptions: _response.requestOptions,
response: _response, response: _response,
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );
@ -126,7 +126,7 @@ class FooApi {
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] containing a [Response] with a [BuiltList<FooRefOrValue>] as data /// 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({ Future<Response<BuiltList<FooRefOrValue>>> getAllFoos({
CancelToken? cancelToken, CancelToken? cancelToken,
Map<String, dynamic>? headers, Map<String, dynamic>? headers,
@ -166,10 +166,10 @@ class FooApi {
) as BuiltList<FooRefOrValue>; ) as BuiltList<FooRefOrValue>;
} catch (error, stackTrace) { } catch (error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _response.requestOptions, requestOptions: _response.requestOptions,
response: _response, response: _response,
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );

View File

@ -7,7 +7,7 @@ environment:
sdk: '>=2.15.0 <3.0.0' sdk: '>=2.15.0 <3.0.0'
dependencies: dependencies:
dio: '^5.0.0' dio: '^5.2.0'
one_of: '>=1.5.0 <2.0.0' one_of: '>=1.5.0 <2.0.0'
one_of_serializer: '>=1.5.0 <2.0.0' one_of_serializer: '>=1.5.0 <2.0.0'
built_value: '>=8.4.0 <9.0.0' built_value: '>=8.4.0 <9.0.0'

View File

@ -51,7 +51,7 @@ final api = Openapi().getDefaultApi();
try { try {
final response = await api.list(); final response = await api.list();
print(response); print(response);
} catch on DioError (e) { } catch on DioException (e) {
print("Exception when calling DefaultApi->list: $e\n"); print("Exception when calling DefaultApi->list: $e\n");
} }

View File

@ -26,7 +26,7 @@ final api = Openapi().getDefaultApi();
try { try {
final response = api.list(); final response = api.list();
print(response); print(response);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling DefaultApi->list: $e\n'); print('Exception when calling DefaultApi->list: $e\n');
} }
``` ```

View File

@ -29,7 +29,7 @@ class DefaultApi {
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] containing a [Response] with a [Example] as data /// 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({ Future<Response<Example>> list({
CancelToken? cancelToken, CancelToken? cancelToken,
Map<String, dynamic>? headers, Map<String, dynamic>? headers,
@ -69,10 +69,10 @@ class DefaultApi {
) as Example; ) as Example;
} catch (error, stackTrace) { } catch (error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _response.requestOptions, requestOptions: _response.requestOptions,
response: _response, response: _response,
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );

View File

@ -7,7 +7,7 @@ environment:
sdk: '>=2.15.0 <3.0.0' sdk: '>=2.15.0 <3.0.0'
dependencies: dependencies:
dio: '^5.0.0' dio: '^5.2.0'
one_of: '>=1.5.0 <2.0.0' one_of: '>=1.5.0 <2.0.0'
one_of_serializer: '>=1.5.0 <2.0.0' one_of_serializer: '>=1.5.0 <2.0.0'
built_value: '>=8.4.0 <9.0.0' built_value: '>=8.4.0 <9.0.0'

View File

@ -53,7 +53,7 @@ final ModelClient modelClient = ; // ModelClient | client model
try { try {
final response = await api.call123testSpecialTags(modelClient); final response = await api.call123testSpecialTags(modelClient);
print(response); print(response);
} catch on DioError (e) { } catch on DioException (e) {
print("Exception when calling AnotherFakeApi->call123testSpecialTags: $e\n"); print("Exception when calling AnotherFakeApi->call123testSpecialTags: $e\n");
} }

View File

@ -29,7 +29,7 @@ final ModelClient modelClient = ; // ModelClient | client model
try { try {
final response = api.call123testSpecialTags(modelClient); final response = api.call123testSpecialTags(modelClient);
print(response); print(response);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling AnotherFakeApi->call123testSpecialTags: $e\n'); print('Exception when calling AnotherFakeApi->call123testSpecialTags: $e\n');
} }
``` ```

View File

@ -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)

View File

@ -26,7 +26,7 @@ final api = Openapi().getDefaultApi();
try { try {
final response = api.fooGet(); final response = api.fooGet();
print(response); print(response);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling DefaultApi->fooGet: $e\n'); print('Exception when calling DefaultApi->fooGet: $e\n');
} }
``` ```

View File

@ -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)

View File

@ -45,7 +45,7 @@ final api = Openapi().getFakeApi();
try { try {
final response = api.fakeBigDecimalMap(); final response = api.fakeBigDecimalMap();
print(response); print(response);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling FakeApi->fakeBigDecimalMap: $e\n'); print('Exception when calling FakeApi->fakeBigDecimalMap: $e\n');
} }
``` ```
@ -82,7 +82,7 @@ final api = Openapi().getFakeApi();
try { try {
final response = api.fakeHealthGet(); final response = api.fakeHealthGet();
print(response); print(response);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling FakeApi->fakeHealthGet: $e\n'); print('Exception when calling FakeApi->fakeHealthGet: $e\n');
} }
``` ```
@ -121,7 +121,7 @@ final String header1 = header1_example; // String | header parameter
try { try {
api.fakeHttpSignatureTest(pet, query1, header1); api.fakeHttpSignatureTest(pet, query1, header1);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling FakeApi->fakeHttpSignatureTest: $e\n'); print('Exception when calling FakeApi->fakeHttpSignatureTest: $e\n');
} }
``` ```
@ -166,7 +166,7 @@ final bool body = true; // bool | Input boolean as post body
try { try {
final response = api.fakeOuterBooleanSerialize(body); final response = api.fakeOuterBooleanSerialize(body);
print(response); print(response);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling FakeApi->fakeOuterBooleanSerialize: $e\n'); print('Exception when calling FakeApi->fakeOuterBooleanSerialize: $e\n');
} }
``` ```
@ -209,7 +209,7 @@ final OuterComposite outerComposite = ; // OuterComposite | Input composite as p
try { try {
final response = api.fakeOuterCompositeSerialize(outerComposite); final response = api.fakeOuterCompositeSerialize(outerComposite);
print(response); print(response);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling FakeApi->fakeOuterCompositeSerialize: $e\n'); print('Exception when calling FakeApi->fakeOuterCompositeSerialize: $e\n');
} }
``` ```
@ -252,7 +252,7 @@ final num body = 8.14; // num | Input number as post body
try { try {
final response = api.fakeOuterNumberSerialize(body); final response = api.fakeOuterNumberSerialize(body);
print(response); print(response);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling FakeApi->fakeOuterNumberSerialize: $e\n'); print('Exception when calling FakeApi->fakeOuterNumberSerialize: $e\n');
} }
``` ```
@ -295,7 +295,7 @@ final String body = body_example; // String | Input string as post body
try { try {
final response = api.fakeOuterStringSerialize(body); final response = api.fakeOuterStringSerialize(body);
print(response); print(response);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling FakeApi->fakeOuterStringSerialize: $e\n'); print('Exception when calling FakeApi->fakeOuterStringSerialize: $e\n');
} }
``` ```
@ -338,7 +338,7 @@ final OuterObjectWithEnumProperty outerObjectWithEnumProperty = ; // OuterObject
try { try {
final response = api.fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty); final response = api.fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty);
print(response); print(response);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling FakeApi->fakePropertyEnumIntegerSerialize: $e\n'); print('Exception when calling FakeApi->fakePropertyEnumIntegerSerialize: $e\n');
} }
``` ```
@ -380,7 +380,7 @@ final MultipartFile body = BINARY_DATA_HERE; // MultipartFile | image to upload
try { try {
api.testBodyWithBinary(body); api.testBodyWithBinary(body);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling FakeApi->testBodyWithBinary: $e\n'); print('Exception when calling FakeApi->testBodyWithBinary: $e\n');
} }
``` ```
@ -422,7 +422,7 @@ final FileSchemaTestClass fileSchemaTestClass = ; // FileSchemaTestClass |
try { try {
api.testBodyWithFileSchema(fileSchemaTestClass); api.testBodyWithFileSchema(fileSchemaTestClass);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling FakeApi->testBodyWithFileSchema: $e\n'); print('Exception when calling FakeApi->testBodyWithFileSchema: $e\n');
} }
``` ```
@ -463,7 +463,7 @@ final User user = ; // User |
try { try {
api.testBodyWithQueryParams(query, user); api.testBodyWithQueryParams(query, user);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling FakeApi->testBodyWithQueryParams: $e\n'); print('Exception when calling FakeApi->testBodyWithQueryParams: $e\n');
} }
``` ```
@ -507,7 +507,7 @@ final ModelClient modelClient = ; // ModelClient | client model
try { try {
final response = api.testClientModel(modelClient); final response = api.testClientModel(modelClient);
print(response); print(response);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling FakeApi->testClientModel: $e\n'); print('Exception when calling FakeApi->testClientModel: $e\n');
} }
``` ```
@ -565,7 +565,7 @@ final String callback = callback_example; // String | None
try { try {
api.testEndpointParameters(number, double_, patternWithoutDelimiter, byte, integer, int32, int64, float, string, binary, date, dateTime, password, callback); 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'); print('Exception when calling FakeApi->testEndpointParameters: $e\n');
} }
``` ```
@ -628,7 +628,7 @@ final String enumFormString = enumFormString_example; // String | Form parameter
try { try {
api.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString); 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'); print('Exception when calling FakeApi->testEnumParameters: $e\n');
} }
``` ```
@ -683,7 +683,7 @@ final int int64Group = 789; // int | Integer in group parameters
try { try {
api.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); api.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling FakeApi->testGroupParameters: $e\n'); print('Exception when calling FakeApi->testGroupParameters: $e\n');
} }
``` ```
@ -730,7 +730,7 @@ final Map<String, String> requestBody = ; // Map<String, String> | request body
try { try {
api.testInlineAdditionalProperties(requestBody); api.testInlineAdditionalProperties(requestBody);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling FakeApi->testInlineAdditionalProperties: $e\n'); print('Exception when calling FakeApi->testInlineAdditionalProperties: $e\n');
} }
``` ```
@ -773,7 +773,7 @@ final String param2 = param2_example; // String | field2
try { try {
api.testJsonFormData(param, param2); api.testJsonFormData(param, param2);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling FakeApi->testJsonFormData: $e\n'); print('Exception when calling FakeApi->testJsonFormData: $e\n');
} }
``` ```
@ -822,7 +822,7 @@ final Map<String, String> language = ; // Map<String, String> |
try { try {
api.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language); 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'); print('Exception when calling FakeApi->testQueryParameterCollectionFormat: $e\n');
} }
``` ```

View File

@ -33,7 +33,7 @@ final ModelClient modelClient = ; // ModelClient | client model
try { try {
final response = api.testClassname(modelClient); final response = api.testClassname(modelClient);
print(response); print(response);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling FakeClassnameTags123Api->testClassname: $e\n'); print('Exception when calling FakeClassnameTags123Api->testClassname: $e\n');
} }
``` ```

View File

@ -38,7 +38,7 @@ final Pet pet = ; // Pet | Pet object that needs to be added to the store
try { try {
api.addPet(pet); api.addPet(pet);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling PetApi->addPet: $e\n'); print('Exception when calling PetApi->addPet: $e\n');
} }
``` ```
@ -83,7 +83,7 @@ final String apiKey = apiKey_example; // String |
try { try {
api.deletePet(petId, apiKey); api.deletePet(petId, apiKey);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling PetApi->deletePet: $e\n'); 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 { try {
final response = api.findPetsByStatus(status); final response = api.findPetsByStatus(status);
print(response); print(response);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling PetApi->findPetsByStatus: $e\n'); print('Exception when calling PetApi->findPetsByStatus: $e\n');
} }
``` ```
@ -174,7 +174,7 @@ final Set<String> tags = ; // Set<String> | Tags to filter by
try { try {
final response = api.findPetsByTags(tags); final response = api.findPetsByTags(tags);
print(response); print(response);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling PetApi->findPetsByTags: $e\n'); print('Exception when calling PetApi->findPetsByTags: $e\n');
} }
``` ```
@ -221,7 +221,7 @@ final int petId = 789; // int | ID of pet to return
try { try {
final response = api.getPetById(petId); final response = api.getPetById(petId);
print(response); print(response);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling PetApi->getPetById: $e\n'); 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 { try {
api.updatePet(pet); api.updatePet(pet);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling PetApi->updatePet: $e\n'); print('Exception when calling PetApi->updatePet: $e\n');
} }
``` ```
@ -311,7 +311,7 @@ final String status = status_example; // String | Updated status of the pet
try { try {
api.updatePetWithForm(petId, name, status); api.updatePetWithForm(petId, name, status);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling PetApi->updatePetWithForm: $e\n'); print('Exception when calling PetApi->updatePetWithForm: $e\n');
} }
``` ```
@ -360,7 +360,7 @@ final MultipartFile file = BINARY_DATA_HERE; // MultipartFile | file to upload
try { try {
final response = api.uploadFile(petId, additionalMetadata, file); final response = api.uploadFile(petId, additionalMetadata, file);
print(response); print(response);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling PetApi->uploadFile: $e\n'); print('Exception when calling PetApi->uploadFile: $e\n');
} }
``` ```
@ -409,7 +409,7 @@ final String additionalMetadata = additionalMetadata_example; // String | Additi
try { try {
final response = api.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); final response = api.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata);
print(response); print(response);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling PetApi->uploadFileWithRequiredFile: $e\n'); print('Exception when calling PetApi->uploadFileWithRequiredFile: $e\n');
} }
``` ```

View File

@ -31,7 +31,7 @@ final String orderId = orderId_example; // String | ID of the order that needs t
try { try {
api.deleteOrder(orderId); api.deleteOrder(orderId);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling StoreApi->deleteOrder: $e\n'); print('Exception when calling StoreApi->deleteOrder: $e\n');
} }
``` ```
@ -77,7 +77,7 @@ final api = Openapi().getStoreApi();
try { try {
final response = api.getInventory(); final response = api.getInventory();
print(response); print(response);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling StoreApi->getInventory: $e\n'); 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 { try {
final response = api.getOrderById(orderId); final response = api.getOrderById(orderId);
print(response); print(response);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling StoreApi->getOrderById: $e\n'); print('Exception when calling StoreApi->getOrderById: $e\n');
} }
``` ```
@ -160,7 +160,7 @@ final Order order = ; // Order | order placed for purchasing the pet
try { try {
final response = api.placeOrder(order); final response = api.placeOrder(order);
print(response); print(response);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling StoreApi->placeOrder: $e\n'); print('Exception when calling StoreApi->placeOrder: $e\n');
} }
``` ```

View File

@ -35,7 +35,7 @@ final User user = ; // User | Created user object
try { try {
api.createUser(user); api.createUser(user);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling UserApi->createUser: $e\n'); print('Exception when calling UserApi->createUser: $e\n');
} }
``` ```
@ -77,7 +77,7 @@ final List<User> user = ; // List<User> | List of user object
try { try {
api.createUsersWithArrayInput(user); api.createUsersWithArrayInput(user);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling UserApi->createUsersWithArrayInput: $e\n'); print('Exception when calling UserApi->createUsersWithArrayInput: $e\n');
} }
``` ```
@ -119,7 +119,7 @@ final List<User> user = ; // List<User> | List of user object
try { try {
api.createUsersWithListInput(user); api.createUsersWithListInput(user);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling UserApi->createUsersWithListInput: $e\n'); 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 { try {
api.deleteUser(username); api.deleteUser(username);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling UserApi->deleteUser: $e\n'); 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 { try {
final response = api.getUserByName(username); final response = api.getUserByName(username);
print(response); print(response);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling UserApi->getUserByName: $e\n'); print('Exception when calling UserApi->getUserByName: $e\n');
} }
``` ```
@ -248,7 +248,7 @@ final String password = password_example; // String | The password for login in
try { try {
final response = api.loginUser(username, password); final response = api.loginUser(username, password);
print(response); print(response);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling UserApi->loginUser: $e\n'); print('Exception when calling UserApi->loginUser: $e\n');
} }
``` ```
@ -290,7 +290,7 @@ final api = Openapi().getUserApi();
try { try {
api.logoutUser(); api.logoutUser();
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling UserApi->logoutUser: $e\n'); print('Exception when calling UserApi->logoutUser: $e\n');
} }
``` ```
@ -330,7 +330,7 @@ final User user = ; // User | Updated user object
try { try {
api.updateUser(username, user); api.updateUser(username, user);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling UserApi->updateUser: $e\n'); print('Exception when calling UserApi->updateUser: $e\n');
} }
``` ```

View File

@ -30,7 +30,7 @@ class AnotherFakeApi {
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] containing a [Response] with a [ModelClient] as data /// 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({ Future<Response<ModelClient>> call123testSpecialTags({
required ModelClient modelClient, required ModelClient modelClient,
CancelToken? cancelToken, CancelToken? cancelToken,
@ -59,12 +59,12 @@ class AnotherFakeApi {
try { try {
_bodyData=jsonEncode(modelClient); _bodyData=jsonEncode(modelClient);
} catch(error, stackTrace) { } catch(error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _options.compose( requestOptions: _options.compose(
_dio.options, _dio.options,
_path, _path,
), ),
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );
@ -85,10 +85,10 @@ _bodyData=jsonEncode(modelClient);
final rawData = _response.data; final rawData = _response.data;
_responseData = rawData == null ? null : deserialize<ModelClient, ModelClient>(rawData, 'ModelClient', growable: true); _responseData = rawData == null ? null : deserialize<ModelClient, ModelClient>(rawData, 'ModelClient', growable: true);
} catch (error, stackTrace) { } catch (error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _response.requestOptions, requestOptions: _response.requestOptions,
response: _response, response: _response,
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );

View File

@ -29,7 +29,7 @@ class DefaultApi {
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] containing a [Response] with a [FooGetDefaultResponse] as data /// 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({ Future<Response<FooGetDefaultResponse>> fooGet({
CancelToken? cancelToken, CancelToken? cancelToken,
Map<String, dynamic>? headers, Map<String, dynamic>? headers,
@ -65,10 +65,10 @@ class DefaultApi {
final rawData = _response.data; final rawData = _response.data;
_responseData = rawData == null ? null : deserialize<FooGetDefaultResponse, FooGetDefaultResponse>(rawData, 'FooGetDefaultResponse', growable: true); _responseData = rawData == null ? null : deserialize<FooGetDefaultResponse, FooGetDefaultResponse>(rawData, 'FooGetDefaultResponse', growable: true);
} catch (error, stackTrace) { } catch (error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _response.requestOptions, requestOptions: _response.requestOptions,
response: _response, response: _response,
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );

View File

@ -37,7 +37,7 @@ class FakeApi {
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] containing a [Response] with a [FakeBigDecimalMap200Response] as data /// 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({ Future<Response<FakeBigDecimalMap200Response>> fakeBigDecimalMap({
CancelToken? cancelToken, CancelToken? cancelToken,
Map<String, dynamic>? headers, Map<String, dynamic>? headers,
@ -73,10 +73,10 @@ class FakeApi {
final rawData = _response.data; final rawData = _response.data;
_responseData = rawData == null ? null : deserialize<FakeBigDecimalMap200Response, FakeBigDecimalMap200Response>(rawData, 'FakeBigDecimalMap200Response', growable: true); _responseData = rawData == null ? null : deserialize<FakeBigDecimalMap200Response, FakeBigDecimalMap200Response>(rawData, 'FakeBigDecimalMap200Response', growable: true);
} catch (error, stackTrace) { } catch (error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _response.requestOptions, requestOptions: _response.requestOptions,
response: _response, response: _response,
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );
@ -106,7 +106,7 @@ _responseData = rawData == null ? null : deserialize<FakeBigDecimalMap200Respons
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] containing a [Response] with a [HealthCheckResult] as data /// 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({ Future<Response<HealthCheckResult>> fakeHealthGet({
CancelToken? cancelToken, CancelToken? cancelToken,
Map<String, dynamic>? headers, Map<String, dynamic>? headers,
@ -142,10 +142,10 @@ _responseData = rawData == null ? null : deserialize<FakeBigDecimalMap200Respons
final rawData = _response.data; final rawData = _response.data;
_responseData = rawData == null ? null : deserialize<HealthCheckResult, HealthCheckResult>(rawData, 'HealthCheckResult', growable: true); _responseData = rawData == null ? null : deserialize<HealthCheckResult, HealthCheckResult>(rawData, 'HealthCheckResult', growable: true);
} catch (error, stackTrace) { } catch (error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _response.requestOptions, requestOptions: _response.requestOptions,
response: _response, response: _response,
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, 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 /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] /// Returns a [Future]
/// Throws [DioError] if API call or serialization fails /// Throws [DioException] if API call or serialization fails
Future<Response<void>> fakeHttpSignatureTest({ Future<Response<void>> fakeHttpSignatureTest({
required Pet pet, required Pet pet,
String? query1, String? query1,
@ -220,13 +220,13 @@ _responseData = rawData == null ? null : deserialize<HealthCheckResult, HealthCh
try { try {
_bodyData=jsonEncode(pet); _bodyData=jsonEncode(pet);
} catch(error, stackTrace) { } catch(error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _options.compose( requestOptions: _options.compose(
_dio.options, _dio.options,
_path, _path,
queryParameters: _queryParameters, queryParameters: _queryParameters,
), ),
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );
@ -258,7 +258,7 @@ _bodyData=jsonEncode(pet);
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] containing a [Response] with a [bool] as data /// 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({ Future<Response<bool>> fakeOuterBooleanSerialize({
bool? body, bool? body,
CancelToken? cancelToken, CancelToken? cancelToken,
@ -287,12 +287,12 @@ _bodyData=jsonEncode(pet);
try { try {
_bodyData=jsonEncode(body); _bodyData=jsonEncode(body);
} catch(error, stackTrace) { } catch(error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _options.compose( requestOptions: _options.compose(
_dio.options, _dio.options,
_path, _path,
), ),
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );
@ -313,10 +313,10 @@ _bodyData=jsonEncode(body);
final rawData = _response.data; final rawData = _response.data;
_responseData = rawData == null ? null : deserialize<bool, bool>(rawData, 'bool', growable: true); _responseData = rawData == null ? null : deserialize<bool, bool>(rawData, 'bool', growable: true);
} catch (error, stackTrace) { } catch (error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _response.requestOptions, requestOptions: _response.requestOptions,
response: _response, response: _response,
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, 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 /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] containing a [Response] with a [OuterComposite] as data /// 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({ Future<Response<OuterComposite>> fakeOuterCompositeSerialize({
OuterComposite? outerComposite, OuterComposite? outerComposite,
CancelToken? cancelToken, CancelToken? cancelToken,
@ -376,12 +376,12 @@ _responseData = rawData == null ? null : deserialize<bool, bool>(rawData, 'bool'
try { try {
_bodyData=jsonEncode(outerComposite); _bodyData=jsonEncode(outerComposite);
} catch(error, stackTrace) { } catch(error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _options.compose( requestOptions: _options.compose(
_dio.options, _dio.options,
_path, _path,
), ),
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );
@ -402,10 +402,10 @@ _bodyData=jsonEncode(outerComposite);
final rawData = _response.data; final rawData = _response.data;
_responseData = rawData == null ? null : deserialize<OuterComposite, OuterComposite>(rawData, 'OuterComposite', growable: true); _responseData = rawData == null ? null : deserialize<OuterComposite, OuterComposite>(rawData, 'OuterComposite', growable: true);
} catch (error, stackTrace) { } catch (error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _response.requestOptions, requestOptions: _response.requestOptions,
response: _response, response: _response,
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, 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 /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] containing a [Response] with a [num] as data /// 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({ Future<Response<num>> fakeOuterNumberSerialize({
num? body, num? body,
CancelToken? cancelToken, CancelToken? cancelToken,
@ -465,12 +465,12 @@ _responseData = rawData == null ? null : deserialize<OuterComposite, OuterCompos
try { try {
_bodyData=jsonEncode(body); _bodyData=jsonEncode(body);
} catch(error, stackTrace) { } catch(error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _options.compose( requestOptions: _options.compose(
_dio.options, _dio.options,
_path, _path,
), ),
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );
@ -491,10 +491,10 @@ _bodyData=jsonEncode(body);
final rawData = _response.data; final rawData = _response.data;
_responseData = rawData == null ? null : deserialize<num, num>(rawData, 'num', growable: true); _responseData = rawData == null ? null : deserialize<num, num>(rawData, 'num', growable: true);
} catch (error, stackTrace) { } catch (error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _response.requestOptions, requestOptions: _response.requestOptions,
response: _response, response: _response,
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, 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 /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] containing a [Response] with a [String] as data /// 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({ Future<Response<String>> fakeOuterStringSerialize({
String? body, String? body,
CancelToken? cancelToken, CancelToken? cancelToken,
@ -554,12 +554,12 @@ _responseData = rawData == null ? null : deserialize<num, num>(rawData, 'num', g
try { try {
_bodyData=jsonEncode(body); _bodyData=jsonEncode(body);
} catch(error, stackTrace) { } catch(error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _options.compose( requestOptions: _options.compose(
_dio.options, _dio.options,
_path, _path,
), ),
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );
@ -580,10 +580,10 @@ _bodyData=jsonEncode(body);
final rawData = _response.data; final rawData = _response.data;
_responseData = rawData == null ? null : deserialize<String, String>(rawData, 'String', growable: true); _responseData = rawData == null ? null : deserialize<String, String>(rawData, 'String', growable: true);
} catch (error, stackTrace) { } catch (error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _response.requestOptions, requestOptions: _response.requestOptions,
response: _response, response: _response,
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, 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 /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] containing a [Response] with a [OuterObjectWithEnumProperty] as data /// 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({ Future<Response<OuterObjectWithEnumProperty>> fakePropertyEnumIntegerSerialize({
required OuterObjectWithEnumProperty outerObjectWithEnumProperty, required OuterObjectWithEnumProperty outerObjectWithEnumProperty,
CancelToken? cancelToken, CancelToken? cancelToken,
@ -643,12 +643,12 @@ _responseData = rawData == null ? null : deserialize<String, String>(rawData, 'S
try { try {
_bodyData=jsonEncode(outerObjectWithEnumProperty); _bodyData=jsonEncode(outerObjectWithEnumProperty);
} catch(error, stackTrace) { } catch(error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _options.compose( requestOptions: _options.compose(
_dio.options, _dio.options,
_path, _path,
), ),
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );
@ -669,10 +669,10 @@ _bodyData=jsonEncode(outerObjectWithEnumProperty);
final rawData = _response.data; final rawData = _response.data;
_responseData = rawData == null ? null : deserialize<OuterObjectWithEnumProperty, OuterObjectWithEnumProperty>(rawData, 'OuterObjectWithEnumProperty', growable: true); _responseData = rawData == null ? null : deserialize<OuterObjectWithEnumProperty, OuterObjectWithEnumProperty>(rawData, 'OuterObjectWithEnumProperty', growable: true);
} catch (error, stackTrace) { } catch (error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _response.requestOptions, requestOptions: _response.requestOptions,
response: _response, response: _response,
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );
@ -703,7 +703,7 @@ _responseData = rawData == null ? null : deserialize<OuterObjectWithEnumProperty
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] /// Returns a [Future]
/// Throws [DioError] if API call or serialization fails /// Throws [DioException] if API call or serialization fails
Future<Response<void>> testBodyWithBinary({ Future<Response<void>> testBodyWithBinary({
MultipartFile? body, MultipartFile? body,
CancelToken? cancelToken, CancelToken? cancelToken,
@ -732,12 +732,12 @@ _responseData = rawData == null ? null : deserialize<OuterObjectWithEnumProperty
try { try {
_bodyData=jsonEncode(body); _bodyData=jsonEncode(body);
} catch(error, stackTrace) { } catch(error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _options.compose( requestOptions: _options.compose(
_dio.options, _dio.options,
_path, _path,
), ),
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );
@ -768,7 +768,7 @@ _bodyData=jsonEncode(body);
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] /// Returns a [Future]
/// Throws [DioError] if API call or serialization fails /// Throws [DioException] if API call or serialization fails
Future<Response<void>> testBodyWithFileSchema({ Future<Response<void>> testBodyWithFileSchema({
required FileSchemaTestClass fileSchemaTestClass, required FileSchemaTestClass fileSchemaTestClass,
CancelToken? cancelToken, CancelToken? cancelToken,
@ -797,12 +797,12 @@ _bodyData=jsonEncode(body);
try { try {
_bodyData=jsonEncode(fileSchemaTestClass); _bodyData=jsonEncode(fileSchemaTestClass);
} catch(error, stackTrace) { } catch(error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _options.compose( requestOptions: _options.compose(
_dio.options, _dio.options,
_path, _path,
), ),
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );
@ -834,7 +834,7 @@ _bodyData=jsonEncode(fileSchemaTestClass);
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] /// Returns a [Future]
/// Throws [DioError] if API call or serialization fails /// Throws [DioException] if API call or serialization fails
Future<Response<void>> testBodyWithQueryParams({ Future<Response<void>> testBodyWithQueryParams({
required String query, required String query,
required User user, required User user,
@ -868,13 +868,13 @@ _bodyData=jsonEncode(fileSchemaTestClass);
try { try {
_bodyData=jsonEncode(user); _bodyData=jsonEncode(user);
} catch(error, stackTrace) { } catch(error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _options.compose( requestOptions: _options.compose(
_dio.options, _dio.options,
_path, _path,
queryParameters: _queryParameters, queryParameters: _queryParameters,
), ),
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );
@ -906,7 +906,7 @@ _bodyData=jsonEncode(user);
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] containing a [Response] with a [ModelClient] as data /// 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({ Future<Response<ModelClient>> testClientModel({
required ModelClient modelClient, required ModelClient modelClient,
CancelToken? cancelToken, CancelToken? cancelToken,
@ -935,12 +935,12 @@ _bodyData=jsonEncode(user);
try { try {
_bodyData=jsonEncode(modelClient); _bodyData=jsonEncode(modelClient);
} catch(error, stackTrace) { } catch(error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _options.compose( requestOptions: _options.compose(
_dio.options, _dio.options,
_path, _path,
), ),
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );
@ -961,10 +961,10 @@ _bodyData=jsonEncode(modelClient);
final rawData = _response.data; final rawData = _response.data;
_responseData = rawData == null ? null : deserialize<ModelClient, ModelClient>(rawData, 'ModelClient', growable: true); _responseData = rawData == null ? null : deserialize<ModelClient, ModelClient>(rawData, 'ModelClient', growable: true);
} catch (error, stackTrace) { } catch (error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _response.requestOptions, requestOptions: _response.requestOptions,
response: _response, response: _response,
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, 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 /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] /// Returns a [Future]
/// Throws [DioError] if API call or serialization fails /// Throws [DioException] if API call or serialization fails
Future<Response<void>> testEndpointParameters({ Future<Response<void>> testEndpointParameters({
required num number, required num number,
required double double_, required double double_,
@ -1056,12 +1056,12 @@ _responseData = rawData == null ? null : deserialize<ModelClient, ModelClient>(r
try { try {
} catch(error, stackTrace) { } catch(error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _options.compose( requestOptions: _options.compose(
_dio.options, _dio.options,
_path, _path,
), ),
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, 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 /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] /// Returns a [Future]
/// Throws [DioError] if API call or serialization fails /// Throws [DioException] if API call or serialization fails
Future<Response<void>> testEnumParameters({ Future<Response<void>> testEnumParameters({
List<String>? enumHeaderStringArray, List<String>? enumHeaderStringArray,
String? enumHeaderString = '-efg', String? enumHeaderString = '-efg',
@ -1147,13 +1147,13 @@ _responseData = rawData == null ? null : deserialize<ModelClient, ModelClient>(r
try { try {
} catch(error, stackTrace) { } catch(error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _options.compose( requestOptions: _options.compose(
_dio.options, _dio.options,
_path, _path,
queryParameters: _queryParameters, queryParameters: _queryParameters,
), ),
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, 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 /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] /// Returns a [Future]
/// Throws [DioError] if API call or serialization fails /// Throws [DioException] if API call or serialization fails
Future<Response<void>> testGroupParameters({ Future<Response<void>> testGroupParameters({
required int requiredStringGroup, required int requiredStringGroup,
required bool requiredBooleanGroup, 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 /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] /// Returns a [Future]
/// Throws [DioError] if API call or serialization fails /// Throws [DioException] if API call or serialization fails
Future<Response<void>> testInlineAdditionalProperties({ Future<Response<void>> testInlineAdditionalProperties({
required Map<String, String> requestBody, required Map<String, String> requestBody,
CancelToken? cancelToken, CancelToken? cancelToken,
@ -1287,12 +1287,12 @@ _responseData = rawData == null ? null : deserialize<ModelClient, ModelClient>(r
try { try {
_bodyData=jsonEncode(requestBody); _bodyData=jsonEncode(requestBody);
} catch(error, stackTrace) { } catch(error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _options.compose( requestOptions: _options.compose(
_dio.options, _dio.options,
_path, _path,
), ),
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );
@ -1324,7 +1324,7 @@ _bodyData=jsonEncode(requestBody);
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] /// Returns a [Future]
/// Throws [DioError] if API call or serialization fails /// Throws [DioException] if API call or serialization fails
Future<Response<void>> testJsonFormData({ Future<Response<void>> testJsonFormData({
required String param, required String param,
required String param2, required String param2,
@ -1354,12 +1354,12 @@ _bodyData=jsonEncode(requestBody);
try { try {
} catch(error, stackTrace) { } catch(error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _options.compose( requestOptions: _options.compose(
_dio.options, _dio.options,
_path, _path,
), ),
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );
@ -1396,7 +1396,7 @@ _bodyData=jsonEncode(requestBody);
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] /// Returns a [Future]
/// Throws [DioError] if API call or serialization fails /// Throws [DioException] if API call or serialization fails
Future<Response<void>> testQueryParameterCollectionFormat({ Future<Response<void>> testQueryParameterCollectionFormat({
required List<String> pipe, required List<String> pipe,
required List<String> ioutil, required List<String> ioutil,

View File

@ -30,7 +30,7 @@ class FakeClassnameTags123Api {
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] containing a [Response] with a [ModelClient] as data /// 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({ Future<Response<ModelClient>> testClassname({
required ModelClient modelClient, required ModelClient modelClient,
CancelToken? cancelToken, CancelToken? cancelToken,
@ -66,12 +66,12 @@ class FakeClassnameTags123Api {
try { try {
_bodyData=jsonEncode(modelClient); _bodyData=jsonEncode(modelClient);
} catch(error, stackTrace) { } catch(error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _options.compose( requestOptions: _options.compose(
_dio.options, _dio.options,
_path, _path,
), ),
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );
@ -92,10 +92,10 @@ _bodyData=jsonEncode(modelClient);
final rawData = _response.data; final rawData = _response.data;
_responseData = rawData == null ? null : deserialize<ModelClient, ModelClient>(rawData, 'ModelClient', growable: true); _responseData = rawData == null ? null : deserialize<ModelClient, ModelClient>(rawData, 'ModelClient', growable: true);
} catch (error, stackTrace) { } catch (error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _response.requestOptions, requestOptions: _response.requestOptions,
response: _response, response: _response,
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );

View File

@ -31,7 +31,7 @@ class PetApi {
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] /// Returns a [Future]
/// Throws [DioError] if API call or serialization fails /// Throws [DioException] if API call or serialization fails
Future<Response<void>> addPet({ Future<Response<void>> addPet({
required Pet pet, required Pet pet,
CancelToken? cancelToken, CancelToken? cancelToken,
@ -65,12 +65,12 @@ class PetApi {
try { try {
_bodyData=jsonEncode(pet); _bodyData=jsonEncode(pet);
} catch(error, stackTrace) { } catch(error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _options.compose( requestOptions: _options.compose(
_dio.options, _dio.options,
_path, _path,
), ),
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );
@ -102,7 +102,7 @@ _bodyData=jsonEncode(pet);
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] /// Returns a [Future]
/// Throws [DioError] if API call or serialization fails /// Throws [DioException] if API call or serialization fails
Future<Response<void>> deletePet({ Future<Response<void>> deletePet({
required int petId, required int petId,
String? apiKey, String? apiKey,
@ -156,7 +156,7 @@ _bodyData=jsonEncode(pet);
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] containing a [Response] with a [List<Pet>] as data /// 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({ Future<Response<List<Pet>>> findPetsByStatus({
@Deprecated('status is deprecated') required List<String> status, @Deprecated('status is deprecated') required List<String> status,
CancelToken? cancelToken, CancelToken? cancelToken,
@ -203,10 +203,10 @@ _bodyData=jsonEncode(pet);
final rawData = _response.data; final rawData = _response.data;
_responseData = rawData == null ? null : deserialize<List<Pet>, Pet>(rawData, 'List<Pet>', growable: true); _responseData = rawData == null ? null : deserialize<List<Pet>, Pet>(rawData, 'List<Pet>', growable: true);
} catch (error, stackTrace) { } catch (error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _response.requestOptions, requestOptions: _response.requestOptions,
response: _response, response: _response,
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, 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 /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] containing a [Response] with a [Set<Pet>] as data /// 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') @Deprecated('This operation has been deprecated')
Future<Response<Set<Pet>>> findPetsByTags({ Future<Response<Set<Pet>>> findPetsByTags({
required Set<String> tags, required Set<String> tags,
@ -285,10 +285,10 @@ _responseData = rawData == null ? null : deserialize<List<Pet>, Pet>(rawData, 'L
final rawData = _response.data; final rawData = _response.data;
_responseData = rawData == null ? null : deserialize<Set<Pet>, Pet>(rawData, 'Set<Pet>', growable: true); _responseData = rawData == null ? null : deserialize<Set<Pet>, Pet>(rawData, 'Set<Pet>', growable: true);
} catch (error, stackTrace) { } catch (error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _response.requestOptions, requestOptions: _response.requestOptions,
response: _response, response: _response,
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, 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 /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] containing a [Response] with a [Pet] as data /// 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({ Future<Response<Pet>> getPetById({
required int petId, required int petId,
CancelToken? cancelToken, CancelToken? cancelToken,
@ -363,10 +363,10 @@ _responseData = rawData == null ? null : deserialize<Set<Pet>, Pet>(rawData, 'Se
final rawData = _response.data; final rawData = _response.data;
_responseData = rawData == null ? null : deserialize<Pet, Pet>(rawData, 'Pet', growable: true); _responseData = rawData == null ? null : deserialize<Pet, Pet>(rawData, 'Pet', growable: true);
} catch (error, stackTrace) { } catch (error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _response.requestOptions, requestOptions: _response.requestOptions,
response: _response, response: _response,
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, 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 /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] /// Returns a [Future]
/// Throws [DioError] if API call or serialization fails /// Throws [DioException] if API call or serialization fails
Future<Response<void>> updatePet({ Future<Response<void>> updatePet({
required Pet pet, required Pet pet,
CancelToken? cancelToken, CancelToken? cancelToken,
@ -431,12 +431,12 @@ _responseData = rawData == null ? null : deserialize<Pet, Pet>(rawData, 'Pet', g
try { try {
_bodyData=jsonEncode(pet); _bodyData=jsonEncode(pet);
} catch(error, stackTrace) { } catch(error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _options.compose( requestOptions: _options.compose(
_dio.options, _dio.options,
_path, _path,
), ),
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );
@ -469,7 +469,7 @@ _bodyData=jsonEncode(pet);
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] /// Returns a [Future]
/// Throws [DioError] if API call or serialization fails /// Throws [DioException] if API call or serialization fails
Future<Response<void>> updatePetWithForm({ Future<Response<void>> updatePetWithForm({
required int petId, required int petId,
String? name, String? name,
@ -505,12 +505,12 @@ _bodyData=jsonEncode(pet);
try { try {
} catch(error, stackTrace) { } catch(error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _options.compose( requestOptions: _options.compose(
_dio.options, _dio.options,
_path, _path,
), ),
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );
@ -543,7 +543,7 @@ _bodyData=jsonEncode(pet);
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] containing a [Response] with a [ApiResponse] as data /// 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({ Future<Response<ApiResponse>> uploadFile({
required int petId, required int petId,
String? additionalMetadata, String? additionalMetadata,
@ -579,12 +579,12 @@ _bodyData=jsonEncode(pet);
try { try {
} catch(error, stackTrace) { } catch(error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _options.compose( requestOptions: _options.compose(
_dio.options, _dio.options,
_path, _path,
), ),
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );
@ -605,10 +605,10 @@ _bodyData=jsonEncode(pet);
final rawData = _response.data; final rawData = _response.data;
_responseData = rawData == null ? null : deserialize<ApiResponse, ApiResponse>(rawData, 'ApiResponse', growable: true); _responseData = rawData == null ? null : deserialize<ApiResponse, ApiResponse>(rawData, 'ApiResponse', growable: true);
} catch (error, stackTrace) { } catch (error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _response.requestOptions, requestOptions: _response.requestOptions,
response: _response, response: _response,
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, 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 /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] containing a [Response] with a [ApiResponse] as data /// 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({ Future<Response<ApiResponse>> uploadFileWithRequiredFile({
required int petId, required int petId,
required MultipartFile requiredFile, required MultipartFile requiredFile,
@ -677,12 +677,12 @@ _responseData = rawData == null ? null : deserialize<ApiResponse, ApiResponse>(r
try { try {
} catch(error, stackTrace) { } catch(error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _options.compose( requestOptions: _options.compose(
_dio.options, _dio.options,
_path, _path,
), ),
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );
@ -703,10 +703,10 @@ _responseData = rawData == null ? null : deserialize<ApiResponse, ApiResponse>(r
final rawData = _response.data; final rawData = _response.data;
_responseData = rawData == null ? null : deserialize<ApiResponse, ApiResponse>(rawData, 'ApiResponse', growable: true); _responseData = rawData == null ? null : deserialize<ApiResponse, ApiResponse>(rawData, 'ApiResponse', growable: true);
} catch (error, stackTrace) { } catch (error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _response.requestOptions, requestOptions: _response.requestOptions,
response: _response, response: _response,
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );

View File

@ -30,7 +30,7 @@ class StoreApi {
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] /// Returns a [Future]
/// Throws [DioError] if API call or serialization fails /// Throws [DioException] if API call or serialization fails
Future<Response<void>> deleteOrder({ Future<Response<void>> deleteOrder({
required String orderId, required String orderId,
CancelToken? cancelToken, CancelToken? cancelToken,
@ -76,7 +76,7 @@ class StoreApi {
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// * [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 /// 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({ Future<Response<Map<String, int>>> getInventory({
CancelToken? cancelToken, CancelToken? cancelToken,
Map<String, dynamic>? headers, Map<String, dynamic>? headers,
@ -119,10 +119,10 @@ class StoreApi {
final rawData = _response.data; final rawData = _response.data;
_responseData = rawData == null ? null : deserialize<Map<String, int>, int>(rawData, 'Map<String, int>', growable: true); _responseData = rawData == null ? null : deserialize<Map<String, int>, int>(rawData, 'Map<String, int>', growable: true);
} catch (error, stackTrace) { } catch (error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _response.requestOptions, requestOptions: _response.requestOptions,
response: _response, response: _response,
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, 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 /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] containing a [Response] with a [Order] as data /// 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({ Future<Response<Order>> getOrderById({
required int orderId, required int orderId,
CancelToken? cancelToken, CancelToken? cancelToken,
@ -190,10 +190,10 @@ _responseData = rawData == null ? null : deserialize<Map<String, int>, int>(rawD
final rawData = _response.data; final rawData = _response.data;
_responseData = rawData == null ? null : deserialize<Order, Order>(rawData, 'Order', growable: true); _responseData = rawData == null ? null : deserialize<Order, Order>(rawData, 'Order', growable: true);
} catch (error, stackTrace) { } catch (error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _response.requestOptions, requestOptions: _response.requestOptions,
response: _response, response: _response,
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, 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 /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] containing a [Response] with a [Order] as data /// 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({ Future<Response<Order>> placeOrder({
required Order order, required Order order,
CancelToken? cancelToken, CancelToken? cancelToken,
@ -253,12 +253,12 @@ _responseData = rawData == null ? null : deserialize<Order, Order>(rawData, 'Ord
try { try {
_bodyData=jsonEncode(order); _bodyData=jsonEncode(order);
} catch(error, stackTrace) { } catch(error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _options.compose( requestOptions: _options.compose(
_dio.options, _dio.options,
_path, _path,
), ),
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );
@ -279,10 +279,10 @@ _bodyData=jsonEncode(order);
final rawData = _response.data; final rawData = _response.data;
_responseData = rawData == null ? null : deserialize<Order, Order>(rawData, 'Order', growable: true); _responseData = rawData == null ? null : deserialize<Order, Order>(rawData, 'Order', growable: true);
} catch (error, stackTrace) { } catch (error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _response.requestOptions, requestOptions: _response.requestOptions,
response: _response, response: _response,
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );

View File

@ -30,7 +30,7 @@ class UserApi {
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] /// Returns a [Future]
/// Throws [DioError] if API call or serialization fails /// Throws [DioException] if API call or serialization fails
Future<Response<void>> createUser({ Future<Response<void>> createUser({
required User user, required User user,
CancelToken? cancelToken, CancelToken? cancelToken,
@ -59,12 +59,12 @@ class UserApi {
try { try {
_bodyData=jsonEncode(user); _bodyData=jsonEncode(user);
} catch(error, stackTrace) { } catch(error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _options.compose( requestOptions: _options.compose(
_dio.options, _dio.options,
_path, _path,
), ),
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );
@ -95,7 +95,7 @@ _bodyData=jsonEncode(user);
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] /// Returns a [Future]
/// Throws [DioError] if API call or serialization fails /// Throws [DioException] if API call or serialization fails
Future<Response<void>> createUsersWithArrayInput({ Future<Response<void>> createUsersWithArrayInput({
required List<User> user, required List<User> user,
CancelToken? cancelToken, CancelToken? cancelToken,
@ -124,12 +124,12 @@ _bodyData=jsonEncode(user);
try { try {
_bodyData=jsonEncode(user); _bodyData=jsonEncode(user);
} catch(error, stackTrace) { } catch(error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _options.compose( requestOptions: _options.compose(
_dio.options, _dio.options,
_path, _path,
), ),
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );
@ -160,7 +160,7 @@ _bodyData=jsonEncode(user);
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] /// Returns a [Future]
/// Throws [DioError] if API call or serialization fails /// Throws [DioException] if API call or serialization fails
Future<Response<void>> createUsersWithListInput({ Future<Response<void>> createUsersWithListInput({
required List<User> user, required List<User> user,
CancelToken? cancelToken, CancelToken? cancelToken,
@ -189,12 +189,12 @@ _bodyData=jsonEncode(user);
try { try {
_bodyData=jsonEncode(user); _bodyData=jsonEncode(user);
} catch(error, stackTrace) { } catch(error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _options.compose( requestOptions: _options.compose(
_dio.options, _dio.options,
_path, _path,
), ),
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );
@ -225,7 +225,7 @@ _bodyData=jsonEncode(user);
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] /// Returns a [Future]
/// Throws [DioError] if API call or serialization fails /// Throws [DioException] if API call or serialization fails
Future<Response<void>> deleteUser({ Future<Response<void>> deleteUser({
required String username, required String username,
CancelToken? cancelToken, CancelToken? cancelToken,
@ -272,7 +272,7 @@ _bodyData=jsonEncode(user);
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] containing a [Response] with a [User] as data /// 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({ Future<Response<User>> getUserByName({
required String username, required String username,
CancelToken? cancelToken, CancelToken? cancelToken,
@ -309,10 +309,10 @@ _bodyData=jsonEncode(user);
final rawData = _response.data; final rawData = _response.data;
_responseData = rawData == null ? null : deserialize<User, User>(rawData, 'User', growable: true); _responseData = rawData == null ? null : deserialize<User, User>(rawData, 'User', growable: true);
} catch (error, stackTrace) { } catch (error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _response.requestOptions, requestOptions: _response.requestOptions,
response: _response, response: _response,
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, 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 /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] containing a [Response] with a [String] as data /// 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({ Future<Response<String>> loginUser({
required String username, required String username,
required String password, required String password,
@ -388,10 +388,10 @@ _responseData = rawData == null ? null : deserialize<User, User>(rawData, 'User'
final rawData = _response.data; final rawData = _response.data;
_responseData = rawData == null ? null : deserialize<String, String>(rawData, 'String', growable: true); _responseData = rawData == null ? null : deserialize<String, String>(rawData, 'String', growable: true);
} catch (error, stackTrace) { } catch (error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _response.requestOptions, requestOptions: _response.requestOptions,
response: _response, response: _response,
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, 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 /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] /// Returns a [Future]
/// Throws [DioError] if API call or serialization fails /// Throws [DioException] if API call or serialization fails
Future<Response<void>> logoutUser({ Future<Response<void>> logoutUser({
CancelToken? cancelToken, CancelToken? cancelToken,
Map<String, dynamic>? headers, 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 /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] /// Returns a [Future]
/// Throws [DioError] if API call or serialization fails /// Throws [DioException] if API call or serialization fails
Future<Response<void>> updateUser({ Future<Response<void>> updateUser({
required String username, required String username,
required User user, required User user,
@ -498,12 +498,12 @@ _responseData = rawData == null ? null : deserialize<String, String>(rawData, 'S
try { try {
_bodyData=jsonEncode(user); _bodyData=jsonEncode(user);
} catch(error, stackTrace) { } catch(error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _options.compose( requestOptions: _options.compose(
_dio.options, _dio.options,
_path, _path,
), ),
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );

View File

@ -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();
}
}

View File

@ -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();
}
}

View File

@ -7,7 +7,7 @@ environment:
sdk: '>=2.15.0 <3.0.0' sdk: '>=2.15.0 <3.0.0'
dependencies: dependencies:
dio: '^5.0.0' dio: '^5.2.0'
json_annotation: '^4.4.0' json_annotation: '^4.4.0'
dev_dependencies: dev_dependencies:

View File

@ -52,7 +52,7 @@ final ModelClient modelClient = ; // ModelClient | client model
try { try {
final response = await api.call123testSpecialTags(modelClient); final response = await api.call123testSpecialTags(modelClient);
print(response); print(response);
} catch on DioError (e) { } catch on DioException (e) {
print("Exception when calling AnotherFakeApi->call123testSpecialTags: $e\n"); print("Exception when calling AnotherFakeApi->call123testSpecialTags: $e\n");
} }

View File

@ -29,7 +29,7 @@ final ModelClient modelClient = ; // ModelClient | client model
try { try {
final response = api.call123testSpecialTags(modelClient); final response = api.call123testSpecialTags(modelClient);
print(response); print(response);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling AnotherFakeApi->call123testSpecialTags: $e\n'); print('Exception when calling AnotherFakeApi->call123testSpecialTags: $e\n');
} }
``` ```

View File

@ -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)

View File

@ -26,7 +26,7 @@ final api = Openapi().getDefaultApi();
try { try {
final response = api.fooGet(); final response = api.fooGet();
print(response); print(response);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling DefaultApi->fooGet: $e\n'); print('Exception when calling DefaultApi->fooGet: $e\n');
} }
``` ```

View File

@ -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)

View File

@ -45,7 +45,7 @@ final api = Openapi().getFakeApi();
try { try {
final response = api.fakeBigDecimalMap(); final response = api.fakeBigDecimalMap();
print(response); print(response);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling FakeApi->fakeBigDecimalMap: $e\n'); print('Exception when calling FakeApi->fakeBigDecimalMap: $e\n');
} }
``` ```
@ -82,7 +82,7 @@ final api = Openapi().getFakeApi();
try { try {
final response = api.fakeHealthGet(); final response = api.fakeHealthGet();
print(response); print(response);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling FakeApi->fakeHealthGet: $e\n'); print('Exception when calling FakeApi->fakeHealthGet: $e\n');
} }
``` ```
@ -121,7 +121,7 @@ final String header1 = header1_example; // String | header parameter
try { try {
api.fakeHttpSignatureTest(pet, query1, header1); api.fakeHttpSignatureTest(pet, query1, header1);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling FakeApi->fakeHttpSignatureTest: $e\n'); print('Exception when calling FakeApi->fakeHttpSignatureTest: $e\n');
} }
``` ```
@ -166,7 +166,7 @@ final bool body = true; // bool | Input boolean as post body
try { try {
final response = api.fakeOuterBooleanSerialize(body); final response = api.fakeOuterBooleanSerialize(body);
print(response); print(response);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling FakeApi->fakeOuterBooleanSerialize: $e\n'); print('Exception when calling FakeApi->fakeOuterBooleanSerialize: $e\n');
} }
``` ```
@ -209,7 +209,7 @@ final OuterComposite outerComposite = ; // OuterComposite | Input composite as p
try { try {
final response = api.fakeOuterCompositeSerialize(outerComposite); final response = api.fakeOuterCompositeSerialize(outerComposite);
print(response); print(response);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling FakeApi->fakeOuterCompositeSerialize: $e\n'); print('Exception when calling FakeApi->fakeOuterCompositeSerialize: $e\n');
} }
``` ```
@ -252,7 +252,7 @@ final num body = 8.14; // num | Input number as post body
try { try {
final response = api.fakeOuterNumberSerialize(body); final response = api.fakeOuterNumberSerialize(body);
print(response); print(response);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling FakeApi->fakeOuterNumberSerialize: $e\n'); print('Exception when calling FakeApi->fakeOuterNumberSerialize: $e\n');
} }
``` ```
@ -295,7 +295,7 @@ final String body = body_example; // String | Input string as post body
try { try {
final response = api.fakeOuterStringSerialize(body); final response = api.fakeOuterStringSerialize(body);
print(response); print(response);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling FakeApi->fakeOuterStringSerialize: $e\n'); print('Exception when calling FakeApi->fakeOuterStringSerialize: $e\n');
} }
``` ```
@ -338,7 +338,7 @@ final OuterObjectWithEnumProperty outerObjectWithEnumProperty = ; // OuterObject
try { try {
final response = api.fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty); final response = api.fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty);
print(response); print(response);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling FakeApi->fakePropertyEnumIntegerSerialize: $e\n'); print('Exception when calling FakeApi->fakePropertyEnumIntegerSerialize: $e\n');
} }
``` ```
@ -380,7 +380,7 @@ final MultipartFile body = BINARY_DATA_HERE; // MultipartFile | image to upload
try { try {
api.testBodyWithBinary(body); api.testBodyWithBinary(body);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling FakeApi->testBodyWithBinary: $e\n'); print('Exception when calling FakeApi->testBodyWithBinary: $e\n');
} }
``` ```
@ -422,7 +422,7 @@ final FileSchemaTestClass fileSchemaTestClass = ; // FileSchemaTestClass |
try { try {
api.testBodyWithFileSchema(fileSchemaTestClass); api.testBodyWithFileSchema(fileSchemaTestClass);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling FakeApi->testBodyWithFileSchema: $e\n'); print('Exception when calling FakeApi->testBodyWithFileSchema: $e\n');
} }
``` ```
@ -463,7 +463,7 @@ final User user = ; // User |
try { try {
api.testBodyWithQueryParams(query, user); api.testBodyWithQueryParams(query, user);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling FakeApi->testBodyWithQueryParams: $e\n'); print('Exception when calling FakeApi->testBodyWithQueryParams: $e\n');
} }
``` ```
@ -507,7 +507,7 @@ final ModelClient modelClient = ; // ModelClient | client model
try { try {
final response = api.testClientModel(modelClient); final response = api.testClientModel(modelClient);
print(response); print(response);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling FakeApi->testClientModel: $e\n'); print('Exception when calling FakeApi->testClientModel: $e\n');
} }
``` ```
@ -565,7 +565,7 @@ final String callback = callback_example; // String | None
try { try {
api.testEndpointParameters(number, double_, patternWithoutDelimiter, byte, integer, int32, int64, float, string, binary, date, dateTime, password, callback); 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'); print('Exception when calling FakeApi->testEndpointParameters: $e\n');
} }
``` ```
@ -628,7 +628,7 @@ final String enumFormString = enumFormString_example; // String | Form parameter
try { try {
api.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString); 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'); print('Exception when calling FakeApi->testEnumParameters: $e\n');
} }
``` ```
@ -683,7 +683,7 @@ final int int64Group = 789; // int | Integer in group parameters
try { try {
api.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); api.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling FakeApi->testGroupParameters: $e\n'); print('Exception when calling FakeApi->testGroupParameters: $e\n');
} }
``` ```
@ -730,7 +730,7 @@ final BuiltMap<String, String> requestBody = ; // BuiltMap<String, String> | req
try { try {
api.testInlineAdditionalProperties(requestBody); api.testInlineAdditionalProperties(requestBody);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling FakeApi->testInlineAdditionalProperties: $e\n'); print('Exception when calling FakeApi->testInlineAdditionalProperties: $e\n');
} }
``` ```
@ -773,7 +773,7 @@ final String param2 = param2_example; // String | field2
try { try {
api.testJsonFormData(param, param2); api.testJsonFormData(param, param2);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling FakeApi->testJsonFormData: $e\n'); print('Exception when calling FakeApi->testJsonFormData: $e\n');
} }
``` ```
@ -822,7 +822,7 @@ final BuiltMap<String, String> language = ; // BuiltMap<String, String> |
try { try {
api.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language); 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'); print('Exception when calling FakeApi->testQueryParameterCollectionFormat: $e\n');
} }
``` ```

View File

@ -33,7 +33,7 @@ final ModelClient modelClient = ; // ModelClient | client model
try { try {
final response = api.testClassname(modelClient); final response = api.testClassname(modelClient);
print(response); print(response);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling FakeClassnameTags123Api->testClassname: $e\n'); print('Exception when calling FakeClassnameTags123Api->testClassname: $e\n');
} }
``` ```

View File

@ -38,7 +38,7 @@ final Pet pet = ; // Pet | Pet object that needs to be added to the store
try { try {
api.addPet(pet); api.addPet(pet);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling PetApi->addPet: $e\n'); print('Exception when calling PetApi->addPet: $e\n');
} }
``` ```
@ -83,7 +83,7 @@ final String apiKey = apiKey_example; // String |
try { try {
api.deletePet(petId, apiKey); api.deletePet(petId, apiKey);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling PetApi->deletePet: $e\n'); print('Exception when calling PetApi->deletePet: $e\n');
} }
``` ```
@ -129,7 +129,7 @@ final BuiltList<String> status = ; // BuiltList<String> | Status values that nee
try { try {
final response = api.findPetsByStatus(status); final response = api.findPetsByStatus(status);
print(response); print(response);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling PetApi->findPetsByStatus: $e\n'); print('Exception when calling PetApi->findPetsByStatus: $e\n');
} }
``` ```
@ -174,7 +174,7 @@ final BuiltSet<String> tags = ; // BuiltSet<String> | Tags to filter by
try { try {
final response = api.findPetsByTags(tags); final response = api.findPetsByTags(tags);
print(response); print(response);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling PetApi->findPetsByTags: $e\n'); print('Exception when calling PetApi->findPetsByTags: $e\n');
} }
``` ```
@ -221,7 +221,7 @@ final int petId = 789; // int | ID of pet to return
try { try {
final response = api.getPetById(petId); final response = api.getPetById(petId);
print(response); print(response);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling PetApi->getPetById: $e\n'); 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 { try {
api.updatePet(pet); api.updatePet(pet);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling PetApi->updatePet: $e\n'); print('Exception when calling PetApi->updatePet: $e\n');
} }
``` ```
@ -311,7 +311,7 @@ final String status = status_example; // String | Updated status of the pet
try { try {
api.updatePetWithForm(petId, name, status); api.updatePetWithForm(petId, name, status);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling PetApi->updatePetWithForm: $e\n'); print('Exception when calling PetApi->updatePetWithForm: $e\n');
} }
``` ```
@ -360,7 +360,7 @@ final MultipartFile file = BINARY_DATA_HERE; // MultipartFile | file to upload
try { try {
final response = api.uploadFile(petId, additionalMetadata, file); final response = api.uploadFile(petId, additionalMetadata, file);
print(response); print(response);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling PetApi->uploadFile: $e\n'); print('Exception when calling PetApi->uploadFile: $e\n');
} }
``` ```
@ -409,7 +409,7 @@ final String additionalMetadata = additionalMetadata_example; // String | Additi
try { try {
final response = api.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); final response = api.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata);
print(response); print(response);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling PetApi->uploadFileWithRequiredFile: $e\n'); print('Exception when calling PetApi->uploadFileWithRequiredFile: $e\n');
} }
``` ```

View File

@ -31,7 +31,7 @@ final String orderId = orderId_example; // String | ID of the order that needs t
try { try {
api.deleteOrder(orderId); api.deleteOrder(orderId);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling StoreApi->deleteOrder: $e\n'); print('Exception when calling StoreApi->deleteOrder: $e\n');
} }
``` ```
@ -77,7 +77,7 @@ final api = Openapi().getStoreApi();
try { try {
final response = api.getInventory(); final response = api.getInventory();
print(response); print(response);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling StoreApi->getInventory: $e\n'); 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 { try {
final response = api.getOrderById(orderId); final response = api.getOrderById(orderId);
print(response); print(response);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling StoreApi->getOrderById: $e\n'); print('Exception when calling StoreApi->getOrderById: $e\n');
} }
``` ```
@ -160,7 +160,7 @@ final Order order = ; // Order | order placed for purchasing the pet
try { try {
final response = api.placeOrder(order); final response = api.placeOrder(order);
print(response); print(response);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling StoreApi->placeOrder: $e\n'); print('Exception when calling StoreApi->placeOrder: $e\n');
} }
``` ```

View File

@ -35,7 +35,7 @@ final User user = ; // User | Created user object
try { try {
api.createUser(user); api.createUser(user);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling UserApi->createUser: $e\n'); print('Exception when calling UserApi->createUser: $e\n');
} }
``` ```
@ -77,7 +77,7 @@ final BuiltList<User> user = ; // BuiltList<User> | List of user object
try { try {
api.createUsersWithArrayInput(user); api.createUsersWithArrayInput(user);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling UserApi->createUsersWithArrayInput: $e\n'); print('Exception when calling UserApi->createUsersWithArrayInput: $e\n');
} }
``` ```
@ -119,7 +119,7 @@ final BuiltList<User> user = ; // BuiltList<User> | List of user object
try { try {
api.createUsersWithListInput(user); api.createUsersWithListInput(user);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling UserApi->createUsersWithListInput: $e\n'); 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 { try {
api.deleteUser(username); api.deleteUser(username);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling UserApi->deleteUser: $e\n'); 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 { try {
final response = api.getUserByName(username); final response = api.getUserByName(username);
print(response); print(response);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling UserApi->getUserByName: $e\n'); print('Exception when calling UserApi->getUserByName: $e\n');
} }
``` ```
@ -248,7 +248,7 @@ final String password = password_example; // String | The password for login in
try { try {
final response = api.loginUser(username, password); final response = api.loginUser(username, password);
print(response); print(response);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling UserApi->loginUser: $e\n'); print('Exception when calling UserApi->loginUser: $e\n');
} }
``` ```
@ -290,7 +290,7 @@ final api = Openapi().getUserApi();
try { try {
api.logoutUser(); api.logoutUser();
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling UserApi->logoutUser: $e\n'); print('Exception when calling UserApi->logoutUser: $e\n');
} }
``` ```
@ -330,7 +330,7 @@ final User user = ; // User | Updated user object
try { try {
api.updateUser(username, user); api.updateUser(username, user);
} catch on DioError (e) { } catch on DioException (e) {
print('Exception when calling UserApi->updateUser: $e\n'); print('Exception when calling UserApi->updateUser: $e\n');
} }
``` ```

View File

@ -30,7 +30,7 @@ class AnotherFakeApi {
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] containing a [Response] with a [ModelClient] as data /// 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({ Future<Response<ModelClient>> call123testSpecialTags({
required ModelClient modelClient, required ModelClient modelClient,
CancelToken? cancelToken, CancelToken? cancelToken,
@ -61,12 +61,12 @@ class AnotherFakeApi {
_bodyData = _serializers.serialize(modelClient, specifiedType: _type); _bodyData = _serializers.serialize(modelClient, specifiedType: _type);
} catch(error, stackTrace) { } catch(error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _options.compose( requestOptions: _options.compose(
_dio.options, _dio.options,
_path, _path,
), ),
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );
@ -91,10 +91,10 @@ class AnotherFakeApi {
) as ModelClient; ) as ModelClient;
} catch (error, stackTrace) { } catch (error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _response.requestOptions, requestOptions: _response.requestOptions,
response: _response, response: _response,
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );

View File

@ -29,7 +29,7 @@ class DefaultApi {
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] containing a [Response] with a [FooGetDefaultResponse] as data /// 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({ Future<Response<FooGetDefaultResponse>> fooGet({
CancelToken? cancelToken, CancelToken? cancelToken,
Map<String, dynamic>? headers, Map<String, dynamic>? headers,
@ -69,10 +69,10 @@ class DefaultApi {
) as FooGetDefaultResponse; ) as FooGetDefaultResponse;
} catch (error, stackTrace) { } catch (error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _response.requestOptions, requestOptions: _response.requestOptions,
response: _response, response: _response,
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );

View File

@ -41,7 +41,7 @@ class FakeApi {
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] containing a [Response] with a [FakeBigDecimalMap200Response] as data /// 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({ Future<Response<FakeBigDecimalMap200Response>> fakeBigDecimalMap({
CancelToken? cancelToken, CancelToken? cancelToken,
Map<String, dynamic>? headers, Map<String, dynamic>? headers,
@ -81,10 +81,10 @@ class FakeApi {
) as FakeBigDecimalMap200Response; ) as FakeBigDecimalMap200Response;
} catch (error, stackTrace) { } catch (error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _response.requestOptions, requestOptions: _response.requestOptions,
response: _response, response: _response,
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );
@ -114,7 +114,7 @@ class FakeApi {
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] containing a [Response] with a [HealthCheckResult] as data /// 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({ Future<Response<HealthCheckResult>> fakeHealthGet({
CancelToken? cancelToken, CancelToken? cancelToken,
Map<String, dynamic>? headers, Map<String, dynamic>? headers,
@ -154,10 +154,10 @@ class FakeApi {
) as HealthCheckResult; ) as HealthCheckResult;
} catch (error, stackTrace) { } catch (error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _response.requestOptions, requestOptions: _response.requestOptions,
response: _response, response: _response,
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );
@ -190,7 +190,7 @@ class FakeApi {
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] /// Returns a [Future]
/// Throws [DioError] if API call or serialization fails /// Throws [DioException] if API call or serialization fails
Future<Response<void>> fakeHttpSignatureTest({ Future<Response<void>> fakeHttpSignatureTest({
required Pet pet, required Pet pet,
String? query1, String? query1,
@ -234,13 +234,13 @@ class FakeApi {
_bodyData = _serializers.serialize(pet, specifiedType: _type); _bodyData = _serializers.serialize(pet, specifiedType: _type);
} catch(error, stackTrace) { } catch(error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _options.compose( requestOptions: _options.compose(
_dio.options, _dio.options,
_path, _path,
queryParameters: _queryParameters, queryParameters: _queryParameters,
), ),
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );
@ -272,7 +272,7 @@ class FakeApi {
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] containing a [Response] with a [bool] as data /// 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({ Future<Response<bool>> fakeOuterBooleanSerialize({
bool? body, bool? body,
CancelToken? cancelToken, CancelToken? cancelToken,
@ -302,12 +302,12 @@ class FakeApi {
_bodyData = body; _bodyData = body;
} catch(error, stackTrace) { } catch(error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _options.compose( requestOptions: _options.compose(
_dio.options, _dio.options,
_path, _path,
), ),
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );
@ -329,10 +329,10 @@ class FakeApi {
_responseData = rawResponse == null ? null : rawResponse as bool; _responseData = rawResponse == null ? null : rawResponse as bool;
} catch (error, stackTrace) { } catch (error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _response.requestOptions, requestOptions: _response.requestOptions,
response: _response, response: _response,
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );
@ -363,7 +363,7 @@ class FakeApi {
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] containing a [Response] with a [OuterComposite] as data /// 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({ Future<Response<OuterComposite>> fakeOuterCompositeSerialize({
OuterComposite? outerComposite, OuterComposite? outerComposite,
CancelToken? cancelToken, CancelToken? cancelToken,
@ -394,12 +394,12 @@ class FakeApi {
_bodyData = outerComposite == null ? null : _serializers.serialize(outerComposite, specifiedType: _type); _bodyData = outerComposite == null ? null : _serializers.serialize(outerComposite, specifiedType: _type);
} catch(error, stackTrace) { } catch(error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _options.compose( requestOptions: _options.compose(
_dio.options, _dio.options,
_path, _path,
), ),
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );
@ -424,10 +424,10 @@ class FakeApi {
) as OuterComposite; ) as OuterComposite;
} catch (error, stackTrace) { } catch (error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _response.requestOptions, requestOptions: _response.requestOptions,
response: _response, response: _response,
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );
@ -458,7 +458,7 @@ class FakeApi {
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] containing a [Response] with a [num] as data /// 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({ Future<Response<num>> fakeOuterNumberSerialize({
num? body, num? body,
CancelToken? cancelToken, CancelToken? cancelToken,
@ -488,12 +488,12 @@ class FakeApi {
_bodyData = body; _bodyData = body;
} catch(error, stackTrace) { } catch(error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _options.compose( requestOptions: _options.compose(
_dio.options, _dio.options,
_path, _path,
), ),
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );
@ -515,10 +515,10 @@ class FakeApi {
_responseData = rawResponse == null ? null : rawResponse as num; _responseData = rawResponse == null ? null : rawResponse as num;
} catch (error, stackTrace) { } catch (error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _response.requestOptions, requestOptions: _response.requestOptions,
response: _response, response: _response,
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );
@ -549,7 +549,7 @@ class FakeApi {
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] containing a [Response] with a [String] as data /// 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({ Future<Response<String>> fakeOuterStringSerialize({
String? body, String? body,
CancelToken? cancelToken, CancelToken? cancelToken,
@ -579,12 +579,12 @@ class FakeApi {
_bodyData = body; _bodyData = body;
} catch(error, stackTrace) { } catch(error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _options.compose( requestOptions: _options.compose(
_dio.options, _dio.options,
_path, _path,
), ),
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );
@ -606,10 +606,10 @@ class FakeApi {
_responseData = rawResponse == null ? null : rawResponse as String; _responseData = rawResponse == null ? null : rawResponse as String;
} catch (error, stackTrace) { } catch (error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _response.requestOptions, requestOptions: _response.requestOptions,
response: _response, response: _response,
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );
@ -640,7 +640,7 @@ class FakeApi {
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] containing a [Response] with a [OuterObjectWithEnumProperty] as data /// 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({ Future<Response<OuterObjectWithEnumProperty>> fakePropertyEnumIntegerSerialize({
required OuterObjectWithEnumProperty outerObjectWithEnumProperty, required OuterObjectWithEnumProperty outerObjectWithEnumProperty,
CancelToken? cancelToken, CancelToken? cancelToken,
@ -671,12 +671,12 @@ class FakeApi {
_bodyData = _serializers.serialize(outerObjectWithEnumProperty, specifiedType: _type); _bodyData = _serializers.serialize(outerObjectWithEnumProperty, specifiedType: _type);
} catch(error, stackTrace) { } catch(error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _options.compose( requestOptions: _options.compose(
_dio.options, _dio.options,
_path, _path,
), ),
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );
@ -701,10 +701,10 @@ class FakeApi {
) as OuterObjectWithEnumProperty; ) as OuterObjectWithEnumProperty;
} catch (error, stackTrace) { } catch (error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _response.requestOptions, requestOptions: _response.requestOptions,
response: _response, response: _response,
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );
@ -735,7 +735,7 @@ class FakeApi {
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] /// Returns a [Future]
/// Throws [DioError] if API call or serialization fails /// Throws [DioException] if API call or serialization fails
Future<Response<void>> testBodyWithBinary({ Future<Response<void>> testBodyWithBinary({
MultipartFile? body, MultipartFile? body,
CancelToken? cancelToken, CancelToken? cancelToken,
@ -765,12 +765,12 @@ class FakeApi {
_bodyData = body?.finalize(); _bodyData = body?.finalize();
} catch(error, stackTrace) { } catch(error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _options.compose( requestOptions: _options.compose(
_dio.options, _dio.options,
_path, _path,
), ),
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );
@ -801,7 +801,7 @@ class FakeApi {
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] /// Returns a [Future]
/// Throws [DioError] if API call or serialization fails /// Throws [DioException] if API call or serialization fails
Future<Response<void>> testBodyWithFileSchema({ Future<Response<void>> testBodyWithFileSchema({
required FileSchemaTestClass fileSchemaTestClass, required FileSchemaTestClass fileSchemaTestClass,
CancelToken? cancelToken, CancelToken? cancelToken,
@ -832,12 +832,12 @@ class FakeApi {
_bodyData = _serializers.serialize(fileSchemaTestClass, specifiedType: _type); _bodyData = _serializers.serialize(fileSchemaTestClass, specifiedType: _type);
} catch(error, stackTrace) { } catch(error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _options.compose( requestOptions: _options.compose(
_dio.options, _dio.options,
_path, _path,
), ),
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );
@ -869,7 +869,7 @@ class FakeApi {
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] /// Returns a [Future]
/// Throws [DioError] if API call or serialization fails /// Throws [DioException] if API call or serialization fails
Future<Response<void>> testBodyWithQueryParams({ Future<Response<void>> testBodyWithQueryParams({
required String query, required String query,
required User user, required User user,
@ -905,13 +905,13 @@ class FakeApi {
_bodyData = _serializers.serialize(user, specifiedType: _type); _bodyData = _serializers.serialize(user, specifiedType: _type);
} catch(error, stackTrace) { } catch(error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _options.compose( requestOptions: _options.compose(
_dio.options, _dio.options,
_path, _path,
queryParameters: _queryParameters, queryParameters: _queryParameters,
), ),
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );
@ -943,7 +943,7 @@ class FakeApi {
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] containing a [Response] with a [ModelClient] as data /// 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({ Future<Response<ModelClient>> testClientModel({
required ModelClient modelClient, required ModelClient modelClient,
CancelToken? cancelToken, CancelToken? cancelToken,
@ -974,12 +974,12 @@ class FakeApi {
_bodyData = _serializers.serialize(modelClient, specifiedType: _type); _bodyData = _serializers.serialize(modelClient, specifiedType: _type);
} catch(error, stackTrace) { } catch(error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _options.compose( requestOptions: _options.compose(
_dio.options, _dio.options,
_path, _path,
), ),
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );
@ -1004,10 +1004,10 @@ class FakeApi {
) as ModelClient; ) as ModelClient;
} catch (error, stackTrace) { } catch (error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _response.requestOptions, requestOptions: _response.requestOptions,
response: _response, response: _response,
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );
@ -1051,7 +1051,7 @@ class FakeApi {
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] /// Returns a [Future]
/// Throws [DioError] if API call or serialization fails /// Throws [DioException] if API call or serialization fails
Future<Response<void>> testEndpointParameters({ Future<Response<void>> testEndpointParameters({
required num number, required num number,
required double double_, required double double_,
@ -1115,12 +1115,12 @@ class FakeApi {
}; };
} catch(error, stackTrace) { } catch(error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _options.compose( requestOptions: _options.compose(
_dio.options, _dio.options,
_path, _path,
), ),
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );
@ -1159,7 +1159,7 @@ class FakeApi {
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] /// Returns a [Future]
/// Throws [DioError] if API call or serialization fails /// Throws [DioException] if API call or serialization fails
Future<Response<void>> testEnumParameters({ Future<Response<void>> testEnumParameters({
BuiltList<String>? enumHeaderStringArray, BuiltList<String>? enumHeaderStringArray,
String? enumHeaderString = '-efg', String? enumHeaderString = '-efg',
@ -1210,13 +1210,13 @@ class FakeApi {
}; };
} catch(error, stackTrace) { } catch(error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _options.compose( requestOptions: _options.compose(
_dio.options, _dio.options,
_path, _path,
queryParameters: _queryParameters, queryParameters: _queryParameters,
), ),
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );
@ -1253,7 +1253,7 @@ class FakeApi {
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] /// Returns a [Future]
/// Throws [DioError] if API call or serialization fails /// Throws [DioException] if API call or serialization fails
Future<Response<void>> testGroupParameters({ Future<Response<void>> testGroupParameters({
required int requiredStringGroup, required int requiredStringGroup,
required bool requiredBooleanGroup, required bool requiredBooleanGroup,
@ -1321,7 +1321,7 @@ class FakeApi {
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] /// Returns a [Future]
/// Throws [DioError] if API call or serialization fails /// Throws [DioException] if API call or serialization fails
Future<Response<void>> testInlineAdditionalProperties({ Future<Response<void>> testInlineAdditionalProperties({
required BuiltMap<String, String> requestBody, required BuiltMap<String, String> requestBody,
CancelToken? cancelToken, CancelToken? cancelToken,
@ -1352,12 +1352,12 @@ class FakeApi {
_bodyData = _serializers.serialize(requestBody, specifiedType: _type); _bodyData = _serializers.serialize(requestBody, specifiedType: _type);
} catch(error, stackTrace) { } catch(error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _options.compose( requestOptions: _options.compose(
_dio.options, _dio.options,
_path, _path,
), ),
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );
@ -1389,7 +1389,7 @@ class FakeApi {
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] /// Returns a [Future]
/// Throws [DioError] if API call or serialization fails /// Throws [DioException] if API call or serialization fails
Future<Response<void>> testJsonFormData({ Future<Response<void>> testJsonFormData({
required String param, required String param,
required String param2, required String param2,
@ -1423,12 +1423,12 @@ class FakeApi {
}; };
} catch(error, stackTrace) { } catch(error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _options.compose( requestOptions: _options.compose(
_dio.options, _dio.options,
_path, _path,
), ),
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );
@ -1465,7 +1465,7 @@ class FakeApi {
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] /// Returns a [Future]
/// Throws [DioError] if API call or serialization fails /// Throws [DioException] if API call or serialization fails
Future<Response<void>> testQueryParameterCollectionFormat({ Future<Response<void>> testQueryParameterCollectionFormat({
required BuiltList<String> pipe, required BuiltList<String> pipe,
required BuiltList<String> ioutil, required BuiltList<String> ioutil,

View File

@ -30,7 +30,7 @@ class FakeClassnameTags123Api {
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] containing a [Response] with a [ModelClient] as data /// 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({ Future<Response<ModelClient>> testClassname({
required ModelClient modelClient, required ModelClient modelClient,
CancelToken? cancelToken, CancelToken? cancelToken,
@ -68,12 +68,12 @@ class FakeClassnameTags123Api {
_bodyData = _serializers.serialize(modelClient, specifiedType: _type); _bodyData = _serializers.serialize(modelClient, specifiedType: _type);
} catch(error, stackTrace) { } catch(error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _options.compose( requestOptions: _options.compose(
_dio.options, _dio.options,
_path, _path,
), ),
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );
@ -98,10 +98,10 @@ class FakeClassnameTags123Api {
) as ModelClient; ) as ModelClient;
} catch (error, stackTrace) { } catch (error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _response.requestOptions, requestOptions: _response.requestOptions,
response: _response, response: _response,
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );

View File

@ -33,7 +33,7 @@ class PetApi {
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] /// Returns a [Future]
/// Throws [DioError] if API call or serialization fails /// Throws [DioException] if API call or serialization fails
Future<Response<void>> addPet({ Future<Response<void>> addPet({
required Pet pet, required Pet pet,
CancelToken? cancelToken, CancelToken? cancelToken,
@ -69,12 +69,12 @@ class PetApi {
_bodyData = _serializers.serialize(pet, specifiedType: _type); _bodyData = _serializers.serialize(pet, specifiedType: _type);
} catch(error, stackTrace) { } catch(error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _options.compose( requestOptions: _options.compose(
_dio.options, _dio.options,
_path, _path,
), ),
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );
@ -106,7 +106,7 @@ class PetApi {
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] /// Returns a [Future]
/// Throws [DioError] if API call or serialization fails /// Throws [DioException] if API call or serialization fails
Future<Response<void>> deletePet({ Future<Response<void>> deletePet({
required int petId, required int petId,
String? apiKey, String? apiKey,
@ -160,7 +160,7 @@ class PetApi {
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] containing a [Response] with a [BuiltList<Pet>] as data /// 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({ Future<Response<BuiltList<Pet>>> findPetsByStatus({
@Deprecated('status is deprecated') required BuiltList<String> status, @Deprecated('status is deprecated') required BuiltList<String> status,
CancelToken? cancelToken, CancelToken? cancelToken,
@ -211,10 +211,10 @@ class PetApi {
) as BuiltList<Pet>; ) as BuiltList<Pet>;
} catch (error, stackTrace) { } catch (error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _response.requestOptions, requestOptions: _response.requestOptions,
response: _response, response: _response,
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );
@ -245,7 +245,7 @@ class PetApi {
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] containing a [Response] with a [BuiltSet<Pet>] as data /// 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') @Deprecated('This operation has been deprecated')
Future<Response<BuiltSet<Pet>>> findPetsByTags({ Future<Response<BuiltSet<Pet>>> findPetsByTags({
required BuiltSet<String> tags, required BuiltSet<String> tags,
@ -297,10 +297,10 @@ class PetApi {
) as BuiltSet<Pet>; ) as BuiltSet<Pet>;
} catch (error, stackTrace) { } catch (error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _response.requestOptions, requestOptions: _response.requestOptions,
response: _response, response: _response,
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );
@ -331,7 +331,7 @@ class PetApi {
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] containing a [Response] with a [Pet] as data /// 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({ Future<Response<Pet>> getPetById({
required int petId, required int petId,
CancelToken? cancelToken, CancelToken? cancelToken,
@ -379,10 +379,10 @@ class PetApi {
) as Pet; ) as Pet;
} catch (error, stackTrace) { } catch (error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _response.requestOptions, requestOptions: _response.requestOptions,
response: _response, response: _response,
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );
@ -413,7 +413,7 @@ class PetApi {
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] /// Returns a [Future]
/// Throws [DioError] if API call or serialization fails /// Throws [DioException] if API call or serialization fails
Future<Response<void>> updatePet({ Future<Response<void>> updatePet({
required Pet pet, required Pet pet,
CancelToken? cancelToken, CancelToken? cancelToken,
@ -449,12 +449,12 @@ class PetApi {
_bodyData = _serializers.serialize(pet, specifiedType: _type); _bodyData = _serializers.serialize(pet, specifiedType: _type);
} catch(error, stackTrace) { } catch(error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _options.compose( requestOptions: _options.compose(
_dio.options, _dio.options,
_path, _path,
), ),
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );
@ -487,7 +487,7 @@ class PetApi {
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] /// Returns a [Future]
/// Throws [DioError] if API call or serialization fails /// Throws [DioException] if API call or serialization fails
Future<Response<void>> updatePetWithForm({ Future<Response<void>> updatePetWithForm({
required int petId, required int petId,
String? name, String? name,
@ -527,12 +527,12 @@ class PetApi {
}; };
} catch(error, stackTrace) { } catch(error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _options.compose( requestOptions: _options.compose(
_dio.options, _dio.options,
_path, _path,
), ),
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );
@ -565,7 +565,7 @@ class PetApi {
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] containing a [Response] with a [ApiResponse] as data /// 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({ Future<Response<ApiResponse>> uploadFile({
required int petId, required int petId,
String? additionalMetadata, String? additionalMetadata,
@ -605,12 +605,12 @@ class PetApi {
}); });
} catch(error, stackTrace) { } catch(error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _options.compose( requestOptions: _options.compose(
_dio.options, _dio.options,
_path, _path,
), ),
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );
@ -635,10 +635,10 @@ class PetApi {
) as ApiResponse; ) as ApiResponse;
} catch (error, stackTrace) { } catch (error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _response.requestOptions, requestOptions: _response.requestOptions,
response: _response, response: _response,
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );
@ -671,7 +671,7 @@ class PetApi {
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] containing a [Response] with a [ApiResponse] as data /// 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({ Future<Response<ApiResponse>> uploadFileWithRequiredFile({
required int petId, required int petId,
required MultipartFile requiredFile, required MultipartFile requiredFile,
@ -711,12 +711,12 @@ class PetApi {
}); });
} catch(error, stackTrace) { } catch(error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _options.compose( requestOptions: _options.compose(
_dio.options, _dio.options,
_path, _path,
), ),
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );
@ -741,10 +741,10 @@ class PetApi {
) as ApiResponse; ) as ApiResponse;
} catch (error, stackTrace) { } catch (error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _response.requestOptions, requestOptions: _response.requestOptions,
response: _response, response: _response,
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );

View File

@ -32,7 +32,7 @@ class StoreApi {
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] /// Returns a [Future]
/// Throws [DioError] if API call or serialization fails /// Throws [DioException] if API call or serialization fails
Future<Response<void>> deleteOrder({ Future<Response<void>> deleteOrder({
required String orderId, required String orderId,
CancelToken? cancelToken, CancelToken? cancelToken,
@ -78,7 +78,7 @@ class StoreApi {
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// * [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 /// 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({ Future<Response<BuiltMap<String, int>>> getInventory({
CancelToken? cancelToken, CancelToken? cancelToken,
Map<String, dynamic>? headers, Map<String, dynamic>? headers,
@ -125,10 +125,10 @@ class StoreApi {
) as BuiltMap<String, int>; ) as BuiltMap<String, int>;
} catch (error, stackTrace) { } catch (error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _response.requestOptions, requestOptions: _response.requestOptions,
response: _response, response: _response,
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );
@ -159,7 +159,7 @@ class StoreApi {
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] containing a [Response] with a [Order] as data /// 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({ Future<Response<Order>> getOrderById({
required int orderId, required int orderId,
CancelToken? cancelToken, CancelToken? cancelToken,
@ -200,10 +200,10 @@ class StoreApi {
) as Order; ) as Order;
} catch (error, stackTrace) { } catch (error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _response.requestOptions, requestOptions: _response.requestOptions,
response: _response, response: _response,
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );
@ -234,7 +234,7 @@ class StoreApi {
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] containing a [Response] with a [Order] as data /// 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({ Future<Response<Order>> placeOrder({
required Order order, required Order order,
CancelToken? cancelToken, CancelToken? cancelToken,
@ -265,12 +265,12 @@ class StoreApi {
_bodyData = _serializers.serialize(order, specifiedType: _type); _bodyData = _serializers.serialize(order, specifiedType: _type);
} catch(error, stackTrace) { } catch(error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _options.compose( requestOptions: _options.compose(
_dio.options, _dio.options,
_path, _path,
), ),
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );
@ -295,10 +295,10 @@ class StoreApi {
) as Order; ) as Order;
} catch (error, stackTrace) { } catch (error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _response.requestOptions, requestOptions: _response.requestOptions,
response: _response, response: _response,
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );

View File

@ -32,7 +32,7 @@ class UserApi {
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] /// Returns a [Future]
/// Throws [DioError] if API call or serialization fails /// Throws [DioException] if API call or serialization fails
Future<Response<void>> createUser({ Future<Response<void>> createUser({
required User user, required User user,
CancelToken? cancelToken, CancelToken? cancelToken,
@ -63,12 +63,12 @@ class UserApi {
_bodyData = _serializers.serialize(user, specifiedType: _type); _bodyData = _serializers.serialize(user, specifiedType: _type);
} catch(error, stackTrace) { } catch(error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _options.compose( requestOptions: _options.compose(
_dio.options, _dio.options,
_path, _path,
), ),
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );
@ -99,7 +99,7 @@ class UserApi {
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] /// Returns a [Future]
/// Throws [DioError] if API call or serialization fails /// Throws [DioException] if API call or serialization fails
Future<Response<void>> createUsersWithArrayInput({ Future<Response<void>> createUsersWithArrayInput({
required BuiltList<User> user, required BuiltList<User> user,
CancelToken? cancelToken, CancelToken? cancelToken,
@ -130,12 +130,12 @@ class UserApi {
_bodyData = _serializers.serialize(user, specifiedType: _type); _bodyData = _serializers.serialize(user, specifiedType: _type);
} catch(error, stackTrace) { } catch(error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _options.compose( requestOptions: _options.compose(
_dio.options, _dio.options,
_path, _path,
), ),
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );
@ -166,7 +166,7 @@ class UserApi {
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] /// Returns a [Future]
/// Throws [DioError] if API call or serialization fails /// Throws [DioException] if API call or serialization fails
Future<Response<void>> createUsersWithListInput({ Future<Response<void>> createUsersWithListInput({
required BuiltList<User> user, required BuiltList<User> user,
CancelToken? cancelToken, CancelToken? cancelToken,
@ -197,12 +197,12 @@ class UserApi {
_bodyData = _serializers.serialize(user, specifiedType: _type); _bodyData = _serializers.serialize(user, specifiedType: _type);
} catch(error, stackTrace) { } catch(error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _options.compose( requestOptions: _options.compose(
_dio.options, _dio.options,
_path, _path,
), ),
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );
@ -233,7 +233,7 @@ class UserApi {
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] /// Returns a [Future]
/// Throws [DioError] if API call or serialization fails /// Throws [DioException] if API call or serialization fails
Future<Response<void>> deleteUser({ Future<Response<void>> deleteUser({
required String username, required String username,
CancelToken? cancelToken, CancelToken? cancelToken,
@ -280,7 +280,7 @@ class UserApi {
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] containing a [Response] with a [User] as data /// 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({ Future<Response<User>> getUserByName({
required String username, required String username,
CancelToken? cancelToken, CancelToken? cancelToken,
@ -321,10 +321,10 @@ class UserApi {
) as User; ) as User;
} catch (error, stackTrace) { } catch (error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _response.requestOptions, requestOptions: _response.requestOptions,
response: _response, response: _response,
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );
@ -356,7 +356,7 @@ class UserApi {
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] containing a [Response] with a [String] as data /// 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({ Future<Response<String>> loginUser({
required String username, required String username,
required String password, required String password,
@ -401,10 +401,10 @@ class UserApi {
_responseData = rawResponse == null ? null : rawResponse as String; _responseData = rawResponse == null ? null : rawResponse as String;
} catch (error, stackTrace) { } catch (error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _response.requestOptions, requestOptions: _response.requestOptions,
response: _response, response: _response,
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );
@ -434,7 +434,7 @@ class UserApi {
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] /// Returns a [Future]
/// Throws [DioError] if API call or serialization fails /// Throws [DioException] if API call or serialization fails
Future<Response<void>> logoutUser({ Future<Response<void>> logoutUser({
CancelToken? cancelToken, CancelToken? cancelToken,
Map<String, dynamic>? headers, Map<String, dynamic>? headers,
@ -481,7 +481,7 @@ class UserApi {
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
/// ///
/// Returns a [Future] /// Returns a [Future]
/// Throws [DioError] if API call or serialization fails /// Throws [DioException] if API call or serialization fails
Future<Response<void>> updateUser({ Future<Response<void>> updateUser({
required String username, required String username,
required User user, required User user,
@ -513,12 +513,12 @@ class UserApi {
_bodyData = _serializers.serialize(user, specifiedType: _type); _bodyData = _serializers.serialize(user, specifiedType: _type);
} catch(error, stackTrace) { } catch(error, stackTrace) {
throw DioError( throw DioException(
requestOptions: _options.compose( requestOptions: _options.compose(
_dio.options, _dio.options,
_path, _path,
), ),
type: DioErrorType.unknown, type: DioExceptionType.unknown,
error: error, error: error,
stackTrace: stackTrace, stackTrace: stackTrace,
); );

View File

@ -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();
}
}

View File

@ -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();
}
}

View File

@ -7,7 +7,7 @@ environment:
sdk: '>=2.15.0 <3.0.0' sdk: '>=2.15.0 <3.0.0'
dependencies: dependencies:
dio: '^5.0.0' dio: '^5.2.0'
one_of: '>=1.5.0 <2.0.0' one_of: '>=1.5.0 <2.0.0'
one_of_serializer: '>=1.5.0 <2.0.0' one_of_serializer: '>=1.5.0 <2.0.0'
built_value: '>=8.4.0 <9.0.0' built_value: '>=8.4.0 <9.0.0'

View File

@ -10,7 +10,7 @@ environment:
dev_dependencies: dev_dependencies:
built_collection: 5.1.1 built_collection: 5.1.1
built_value: 8.4.3 built_value: 8.4.3
dio: 5.0.0 dio: 5.2.1
http_mock_adapter: 0.4.2 http_mock_adapter: 0.4.2
mockito: 5.2.0 mockito: 5.2.0
openapi: openapi:

View File

@ -264,7 +264,7 @@ void main() {
.build(), .build(),
const FullType(Cat), const FullType(Cat),
), ),
'{"className":"cat","color":"black","declawed":false}', '{"color":"black","declawed":false,"className":"cat"}',
); );
}); });
}); });

View File

@ -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)

View File

@ -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)

View File

@ -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>{
};
}

View File

@ -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>{
};
}

View File

@ -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
});
});
}

View File

@ -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
});
});
}