diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/README.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/README.mustache index 52a731a4ae5..50f467f647a 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/README.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/README.mustache @@ -73,7 +73,7 @@ try { {{#returnType}} print(response); {{/returnType}} -} catch on DioError (e) { +} catch on DioException (e) { print("Exception when calling {{classname}}->{{operationId}}: $e\n"); } {{/-first}}{{/operation}}{{/operations}}{{/-first}}{{/apis}}{{/apiInfo}} diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/api.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/api.mustache index 5e315387a74..e86a2cfb005 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/api.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/api.mustache @@ -30,7 +30,7 @@ class {{classname}} { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future]{{#returnType}} containing a [Response] with a [{{{.}}}] as data{{/returnType}} - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails {{#externalDocs}} /// {{description}} /// Also see [{{summary}} Documentation]({{url}}) @@ -93,13 +93,13 @@ class {{classname}} { try { {{#includeLibraryTemplate}}api/serialize{{/includeLibraryTemplate}} } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path,{{#hasQueryParams}} queryParameters: _queryParameters,{{/hasQueryParams}} ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -121,10 +121,10 @@ class {{classname}} { try { {{#includeLibraryTemplate}}api/deserialize{{/includeLibraryTemplate}} } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/api_doc.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/api_doc.mustache index 9b2e8e72f76..10292c43046 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/api_doc.mustache @@ -55,7 +55,7 @@ try { {{#returnType}} print(response); {{/returnType}} -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling {{classname}}->{{operationId}}: $e\n'); } ``` diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/pubspec.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/pubspec.mustache index 90608229c68..e1201880b0c 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/pubspec.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/pubspec.mustache @@ -13,7 +13,7 @@ environment: sdk: '>=2.15.0 <3.0.0' dependencies: - dio: '^5.0.0' + dio: '^5.2.0' {{#useBuiltValue}} one_of: '>=1.5.0 <2.0.0' one_of_serializer: '>=1.5.0 <2.0.0' diff --git a/samples/openapi3/client/petstore/dart-dio/oneof/README.md b/samples/openapi3/client/petstore/dart-dio/oneof/README.md index c87637a4d23..756dc48f59a 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof/README.md +++ b/samples/openapi3/client/petstore/dart-dio/oneof/README.md @@ -51,7 +51,7 @@ final api = Openapi().getDefaultApi(); try { final response = await api.rootGet(); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print("Exception when calling DefaultApi->rootGet: $e\n"); } diff --git a/samples/openapi3/client/petstore/dart-dio/oneof/doc/DefaultApi.md b/samples/openapi3/client/petstore/dart-dio/oneof/doc/DefaultApi.md index 41c9b6f9411..b010661371f 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof/doc/DefaultApi.md +++ b/samples/openapi3/client/petstore/dart-dio/oneof/doc/DefaultApi.md @@ -26,7 +26,7 @@ final api = Openapi().getDefaultApi(); try { final response = api.rootGet(); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling DefaultApi->rootGet: $e\n'); } ``` diff --git a/samples/openapi3/client/petstore/dart-dio/oneof/lib/src/api/default_api.dart b/samples/openapi3/client/petstore/dart-dio/oneof/lib/src/api/default_api.dart index 8833fb64ddc..797199ae174 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof/lib/src/api/default_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof/lib/src/api/default_api.dart @@ -29,7 +29,7 @@ class DefaultApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [Fruit] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> rootGet({ CancelToken? cancelToken, Map? headers, @@ -69,10 +69,10 @@ class DefaultApi { ) as Fruit; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); diff --git a/samples/openapi3/client/petstore/dart-dio/oneof/pubspec.yaml b/samples/openapi3/client/petstore/dart-dio/oneof/pubspec.yaml index 3cc6bce70ed..de93663746d 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof/pubspec.yaml +++ b/samples/openapi3/client/petstore/dart-dio/oneof/pubspec.yaml @@ -7,7 +7,7 @@ environment: sdk: '>=2.15.0 <3.0.0' dependencies: - dio: '^5.0.0' + dio: '^5.2.0' one_of: '>=1.5.0 <2.0.0' one_of_serializer: '>=1.5.0 <2.0.0' built_value: '>=8.4.0 <9.0.0' diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/README.md b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/README.md index 03ab1d62cb0..2db5d76f05d 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/README.md +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/README.md @@ -53,7 +53,7 @@ final BarCreate barCreate = ; // BarCreate | try { final response = await api.createBar(barCreate); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print("Exception when calling BarApi->createBar: $e\n"); } diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/BarApi.md b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/BarApi.md index 3ef168ecf34..a6f23c00210 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/BarApi.md +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/BarApi.md @@ -27,7 +27,7 @@ final BarCreate barCreate = ; // BarCreate | try { final response = api.createBar(barCreate); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling BarApi->createBar: $e\n'); } ``` diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/FooApi.md b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/FooApi.md index 9e8990ebb8b..ff844803f06 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/FooApi.md +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/FooApi.md @@ -28,7 +28,7 @@ final Foo foo = ; // Foo | The Foo to be created try { final response = api.createFoo(foo); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling FooApi->createFoo: $e\n'); } ``` @@ -68,7 +68,7 @@ final api = Openapi().getFooApi(); try { final response = api.getAllFoos(); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling FooApi->getAllFoos: $e\n'); } ``` diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/api/bar_api.dart b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/api/bar_api.dart index a931df9f19a..5cad411a846 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/api/bar_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/api/bar_api.dart @@ -31,7 +31,7 @@ class BarApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [Bar] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> createBar({ required BarCreate barCreate, CancelToken? cancelToken, @@ -62,12 +62,12 @@ class BarApi { _bodyData = _serializers.serialize(barCreate, specifiedType: _type); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -92,10 +92,10 @@ class BarApi { ) as Bar; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/api/foo_api.dart b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/api/foo_api.dart index d23de07674c..4b67cdef3d0 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/api/foo_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/api/foo_api.dart @@ -32,7 +32,7 @@ class FooApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [FooRefOrValue] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> createFoo({ Foo? foo, CancelToken? cancelToken, @@ -63,12 +63,12 @@ class FooApi { _bodyData = foo == null ? null : _serializers.serialize(foo, specifiedType: _type); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -93,10 +93,10 @@ class FooApi { ) as FooRefOrValue; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -126,7 +126,7 @@ class FooApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [BuiltList] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future>> getAllFoos({ CancelToken? cancelToken, Map? headers, @@ -166,10 +166,10 @@ class FooApi { ) as BuiltList; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/pubspec.yaml b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/pubspec.yaml index 3cc6bce70ed..de93663746d 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/pubspec.yaml +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/pubspec.yaml @@ -7,7 +7,7 @@ environment: sdk: '>=2.15.0 <3.0.0' dependencies: - dio: '^5.0.0' + dio: '^5.2.0' one_of: '>=1.5.0 <2.0.0' one_of_serializer: '>=1.5.0 <2.0.0' built_value: '>=8.4.0 <9.0.0' diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_primitive/README.md b/samples/openapi3/client/petstore/dart-dio/oneof_primitive/README.md index f4134dc61db..f407e9306c4 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_primitive/README.md +++ b/samples/openapi3/client/petstore/dart-dio/oneof_primitive/README.md @@ -51,7 +51,7 @@ final api = Openapi().getDefaultApi(); try { final response = await api.list(); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print("Exception when calling DefaultApi->list: $e\n"); } diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_primitive/doc/DefaultApi.md b/samples/openapi3/client/petstore/dart-dio/oneof_primitive/doc/DefaultApi.md index abbf5f07f49..c4077a67727 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_primitive/doc/DefaultApi.md +++ b/samples/openapi3/client/petstore/dart-dio/oneof_primitive/doc/DefaultApi.md @@ -26,7 +26,7 @@ final api = Openapi().getDefaultApi(); try { final response = api.list(); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling DefaultApi->list: $e\n'); } ``` diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_primitive/lib/src/api/default_api.dart b/samples/openapi3/client/petstore/dart-dio/oneof_primitive/lib/src/api/default_api.dart index 1f2cd8ad075..4b5984b8e31 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_primitive/lib/src/api/default_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_primitive/lib/src/api/default_api.dart @@ -29,7 +29,7 @@ class DefaultApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [Example] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> list({ CancelToken? cancelToken, Map? headers, @@ -69,10 +69,10 @@ class DefaultApi { ) as Example; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_primitive/pubspec.yaml b/samples/openapi3/client/petstore/dart-dio/oneof_primitive/pubspec.yaml index 3cc6bce70ed..de93663746d 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_primitive/pubspec.yaml +++ b/samples/openapi3/client/petstore/dart-dio/oneof_primitive/pubspec.yaml @@ -7,7 +7,7 @@ environment: sdk: '>=2.15.0 <3.0.0' dependencies: - dio: '^5.0.0' + dio: '^5.2.0' one_of: '>=1.5.0 <2.0.0' one_of_serializer: '>=1.5.0 <2.0.0' built_value: '>=8.4.0 <9.0.0' diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/README.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/README.md index 5b0e2fa1081..8506db54bbf 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/README.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/README.md @@ -53,7 +53,7 @@ final ModelClient modelClient = ; // ModelClient | client model try { final response = await api.call123testSpecialTags(modelClient); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print("Exception when calling AnotherFakeApi->call123testSpecialTags: $e\n"); } diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/AnotherFakeApi.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/AnotherFakeApi.md index df89b0eb12a..36a94e6bb70 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/AnotherFakeApi.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/AnotherFakeApi.md @@ -29,7 +29,7 @@ final ModelClient modelClient = ; // ModelClient | client model try { final response = api.call123testSpecialTags(modelClient); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling AnotherFakeApi->call123testSpecialTags: $e\n'); } ``` diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/CatAllOf.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/CatAllOf.md new file mode 100644 index 00000000000..36b2ae0e8ab --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/CatAllOf.md @@ -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) + + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/DefaultApi.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/DefaultApi.md index 0bfa6194188..6abd2b44f9c 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/DefaultApi.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/DefaultApi.md @@ -26,7 +26,7 @@ final api = Openapi().getDefaultApi(); try { final response = api.fooGet(); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling DefaultApi->fooGet: $e\n'); } ``` diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/DogAllOf.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/DogAllOf.md new file mode 100644 index 00000000000..97a7c8fba49 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/DogAllOf.md @@ -0,0 +1,15 @@ +# openapi.model.DogAllOf + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**breed** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/FakeApi.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/FakeApi.md index 95579d12a55..1587283037e 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/FakeApi.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/FakeApi.md @@ -45,7 +45,7 @@ final api = Openapi().getFakeApi(); try { final response = api.fakeBigDecimalMap(); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling FakeApi->fakeBigDecimalMap: $e\n'); } ``` @@ -82,7 +82,7 @@ final api = Openapi().getFakeApi(); try { final response = api.fakeHealthGet(); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling FakeApi->fakeHealthGet: $e\n'); } ``` @@ -121,7 +121,7 @@ final String header1 = header1_example; // String | header parameter try { api.fakeHttpSignatureTest(pet, query1, header1); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling FakeApi->fakeHttpSignatureTest: $e\n'); } ``` @@ -166,7 +166,7 @@ final bool body = true; // bool | Input boolean as post body try { final response = api.fakeOuterBooleanSerialize(body); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling FakeApi->fakeOuterBooleanSerialize: $e\n'); } ``` @@ -209,7 +209,7 @@ final OuterComposite outerComposite = ; // OuterComposite | Input composite as p try { final response = api.fakeOuterCompositeSerialize(outerComposite); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling FakeApi->fakeOuterCompositeSerialize: $e\n'); } ``` @@ -252,7 +252,7 @@ final num body = 8.14; // num | Input number as post body try { final response = api.fakeOuterNumberSerialize(body); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling FakeApi->fakeOuterNumberSerialize: $e\n'); } ``` @@ -295,7 +295,7 @@ final String body = body_example; // String | Input string as post body try { final response = api.fakeOuterStringSerialize(body); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling FakeApi->fakeOuterStringSerialize: $e\n'); } ``` @@ -338,7 +338,7 @@ final OuterObjectWithEnumProperty outerObjectWithEnumProperty = ; // OuterObject try { final response = api.fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling FakeApi->fakePropertyEnumIntegerSerialize: $e\n'); } ``` @@ -380,7 +380,7 @@ final MultipartFile body = BINARY_DATA_HERE; // MultipartFile | image to upload try { api.testBodyWithBinary(body); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling FakeApi->testBodyWithBinary: $e\n'); } ``` @@ -422,7 +422,7 @@ final FileSchemaTestClass fileSchemaTestClass = ; // FileSchemaTestClass | try { api.testBodyWithFileSchema(fileSchemaTestClass); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling FakeApi->testBodyWithFileSchema: $e\n'); } ``` @@ -463,7 +463,7 @@ final User user = ; // User | try { api.testBodyWithQueryParams(query, user); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling FakeApi->testBodyWithQueryParams: $e\n'); } ``` @@ -507,7 +507,7 @@ final ModelClient modelClient = ; // ModelClient | client model try { final response = api.testClientModel(modelClient); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling FakeApi->testClientModel: $e\n'); } ``` @@ -565,7 +565,7 @@ final String callback = callback_example; // String | None try { api.testEndpointParameters(number, double_, patternWithoutDelimiter, byte, integer, int32, int64, float, string, binary, date, dateTime, password, callback); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling FakeApi->testEndpointParameters: $e\n'); } ``` @@ -628,7 +628,7 @@ final String enumFormString = enumFormString_example; // String | Form parameter try { api.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling FakeApi->testEnumParameters: $e\n'); } ``` @@ -683,7 +683,7 @@ final int int64Group = 789; // int | Integer in group parameters try { api.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling FakeApi->testGroupParameters: $e\n'); } ``` @@ -730,7 +730,7 @@ final Map requestBody = ; // Map | request body try { api.testInlineAdditionalProperties(requestBody); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling FakeApi->testInlineAdditionalProperties: $e\n'); } ``` @@ -773,7 +773,7 @@ final String param2 = param2_example; // String | field2 try { api.testJsonFormData(param, param2); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling FakeApi->testJsonFormData: $e\n'); } ``` @@ -822,7 +822,7 @@ final Map language = ; // Map | try { api.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling FakeApi->testQueryParameterCollectionFormat: $e\n'); } ``` diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/FakeClassnameTags123Api.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/FakeClassnameTags123Api.md index 35e244fbf21..645aebf399f 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/FakeClassnameTags123Api.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/FakeClassnameTags123Api.md @@ -33,7 +33,7 @@ final ModelClient modelClient = ; // ModelClient | client model try { final response = api.testClassname(modelClient); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling FakeClassnameTags123Api->testClassname: $e\n'); } ``` diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/PetApi.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/PetApi.md index dbf7f15b3cd..5fc7fbd2657 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/PetApi.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/PetApi.md @@ -38,7 +38,7 @@ final Pet pet = ; // Pet | Pet object that needs to be added to the store try { api.addPet(pet); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling PetApi->addPet: $e\n'); } ``` @@ -83,7 +83,7 @@ final String apiKey = apiKey_example; // String | try { api.deletePet(petId, apiKey); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling PetApi->deletePet: $e\n'); } ``` @@ -129,7 +129,7 @@ final List status = ; // List | Status values that need to be co try { final response = api.findPetsByStatus(status); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling PetApi->findPetsByStatus: $e\n'); } ``` @@ -174,7 +174,7 @@ final Set tags = ; // Set | Tags to filter by try { final response = api.findPetsByTags(tags); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling PetApi->findPetsByTags: $e\n'); } ``` @@ -221,7 +221,7 @@ final int petId = 789; // int | ID of pet to return try { final response = api.getPetById(petId); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling PetApi->getPetById: $e\n'); } ``` @@ -265,7 +265,7 @@ final Pet pet = ; // Pet | Pet object that needs to be added to the store try { api.updatePet(pet); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling PetApi->updatePet: $e\n'); } ``` @@ -311,7 +311,7 @@ final String status = status_example; // String | Updated status of the pet try { api.updatePetWithForm(petId, name, status); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling PetApi->updatePetWithForm: $e\n'); } ``` @@ -360,7 +360,7 @@ final MultipartFile file = BINARY_DATA_HERE; // MultipartFile | file to upload try { final response = api.uploadFile(petId, additionalMetadata, file); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling PetApi->uploadFile: $e\n'); } ``` @@ -409,7 +409,7 @@ final String additionalMetadata = additionalMetadata_example; // String | Additi try { final response = api.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling PetApi->uploadFileWithRequiredFile: $e\n'); } ``` diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/StoreApi.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/StoreApi.md index 920e5a8d7b1..42028947229 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/StoreApi.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/StoreApi.md @@ -31,7 +31,7 @@ final String orderId = orderId_example; // String | ID of the order that needs t try { api.deleteOrder(orderId); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling StoreApi->deleteOrder: $e\n'); } ``` @@ -77,7 +77,7 @@ final api = Openapi().getStoreApi(); try { final response = api.getInventory(); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling StoreApi->getInventory: $e\n'); } ``` @@ -117,7 +117,7 @@ final int orderId = 789; // int | ID of pet that needs to be fetched try { final response = api.getOrderById(orderId); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling StoreApi->getOrderById: $e\n'); } ``` @@ -160,7 +160,7 @@ final Order order = ; // Order | order placed for purchasing the pet try { final response = api.placeOrder(order); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling StoreApi->placeOrder: $e\n'); } ``` diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/UserApi.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/UserApi.md index c7fd450beb0..49b79d76b8a 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/UserApi.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/UserApi.md @@ -35,7 +35,7 @@ final User user = ; // User | Created user object try { api.createUser(user); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling UserApi->createUser: $e\n'); } ``` @@ -77,7 +77,7 @@ final List user = ; // List | List of user object try { api.createUsersWithArrayInput(user); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling UserApi->createUsersWithArrayInput: $e\n'); } ``` @@ -119,7 +119,7 @@ final List user = ; // List | List of user object try { api.createUsersWithListInput(user); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling UserApi->createUsersWithListInput: $e\n'); } ``` @@ -161,7 +161,7 @@ final String username = username_example; // String | The name that needs to be try { api.deleteUser(username); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling UserApi->deleteUser: $e\n'); } ``` @@ -204,7 +204,7 @@ final String username = username_example; // String | The name that needs to be try { final response = api.getUserByName(username); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling UserApi->getUserByName: $e\n'); } ``` @@ -248,7 +248,7 @@ final String password = password_example; // String | The password for login in try { final response = api.loginUser(username, password); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling UserApi->loginUser: $e\n'); } ``` @@ -290,7 +290,7 @@ final api = Openapi().getUserApi(); try { api.logoutUser(); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling UserApi->logoutUser: $e\n'); } ``` @@ -330,7 +330,7 @@ final User user = ; // User | Updated user object try { api.updateUser(username, user); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling UserApi->updateUser: $e\n'); } ``` diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/another_fake_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/another_fake_api.dart index 399eef48513..d98f3c23f4f 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/another_fake_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/another_fake_api.dart @@ -30,7 +30,7 @@ class AnotherFakeApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [ModelClient] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> call123testSpecialTags({ required ModelClient modelClient, CancelToken? cancelToken, @@ -59,12 +59,12 @@ class AnotherFakeApi { try { _bodyData=jsonEncode(modelClient); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -85,10 +85,10 @@ _bodyData=jsonEncode(modelClient); final rawData = _response.data; _responseData = rawData == null ? null : deserialize(rawData, 'ModelClient', growable: true); } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/default_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/default_api.dart index c479591e366..e9efb7b5b19 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/default_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/default_api.dart @@ -29,7 +29,7 @@ class DefaultApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [FooGetDefaultResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> fooGet({ CancelToken? cancelToken, Map? headers, @@ -65,10 +65,10 @@ class DefaultApi { final rawData = _response.data; _responseData = rawData == null ? null : deserialize(rawData, 'FooGetDefaultResponse', growable: true); } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/fake_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/fake_api.dart index 66f01d58e76..a6dd002c83c 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/fake_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/fake_api.dart @@ -37,7 +37,7 @@ class FakeApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [FakeBigDecimalMap200Response] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> fakeBigDecimalMap({ CancelToken? cancelToken, Map? headers, @@ -73,10 +73,10 @@ class FakeApi { final rawData = _response.data; _responseData = rawData == null ? null : deserialize(rawData, 'FakeBigDecimalMap200Response', growable: true); } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -106,7 +106,7 @@ _responseData = rawData == null ? null : deserialize> fakeHealthGet({ CancelToken? cancelToken, Map? headers, @@ -142,10 +142,10 @@ _responseData = rawData == null ? null : deserialize(rawData, 'HealthCheckResult', growable: true); } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -178,7 +178,7 @@ _responseData = rawData == null ? null : deserialize> fakeHttpSignatureTest({ required Pet pet, String? query1, @@ -220,13 +220,13 @@ _responseData = rawData == null ? null : deserialize> fakeOuterBooleanSerialize({ bool? body, CancelToken? cancelToken, @@ -287,12 +287,12 @@ _bodyData=jsonEncode(pet); try { _bodyData=jsonEncode(body); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -313,10 +313,10 @@ _bodyData=jsonEncode(body); final rawData = _response.data; _responseData = rawData == null ? null : deserialize(rawData, 'bool', growable: true); } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -347,7 +347,7 @@ _responseData = rawData == null ? null : deserialize(rawData, 'bool' /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [OuterComposite] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> fakeOuterCompositeSerialize({ OuterComposite? outerComposite, CancelToken? cancelToken, @@ -376,12 +376,12 @@ _responseData = rawData == null ? null : deserialize(rawData, 'bool' try { _bodyData=jsonEncode(outerComposite); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -402,10 +402,10 @@ _bodyData=jsonEncode(outerComposite); final rawData = _response.data; _responseData = rawData == null ? null : deserialize(rawData, 'OuterComposite', growable: true); } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -436,7 +436,7 @@ _responseData = rawData == null ? null : deserialize> fakeOuterNumberSerialize({ num? body, CancelToken? cancelToken, @@ -465,12 +465,12 @@ _responseData = rawData == null ? null : deserialize(rawData, 'num', growable: true); } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -525,7 +525,7 @@ _responseData = rawData == null ? null : deserialize(rawData, 'num', g /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [String] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> fakeOuterStringSerialize({ String? body, CancelToken? cancelToken, @@ -554,12 +554,12 @@ _responseData = rawData == null ? null : deserialize(rawData, 'num', g try { _bodyData=jsonEncode(body); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -580,10 +580,10 @@ _bodyData=jsonEncode(body); final rawData = _response.data; _responseData = rawData == null ? null : deserialize(rawData, 'String', growable: true); } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -614,7 +614,7 @@ _responseData = rawData == null ? null : deserialize(rawData, 'S /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [OuterObjectWithEnumProperty] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> fakePropertyEnumIntegerSerialize({ required OuterObjectWithEnumProperty outerObjectWithEnumProperty, CancelToken? cancelToken, @@ -643,12 +643,12 @@ _responseData = rawData == null ? null : deserialize(rawData, 'S try { _bodyData=jsonEncode(outerObjectWithEnumProperty); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -669,10 +669,10 @@ _bodyData=jsonEncode(outerObjectWithEnumProperty); final rawData = _response.data; _responseData = rawData == null ? null : deserialize(rawData, 'OuterObjectWithEnumProperty', growable: true); } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -703,7 +703,7 @@ _responseData = rawData == null ? null : deserialize> testBodyWithBinary({ MultipartFile? body, CancelToken? cancelToken, @@ -732,12 +732,12 @@ _responseData = rawData == null ? null : deserialize> testBodyWithFileSchema({ required FileSchemaTestClass fileSchemaTestClass, CancelToken? cancelToken, @@ -797,12 +797,12 @@ _bodyData=jsonEncode(body); try { _bodyData=jsonEncode(fileSchemaTestClass); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -834,7 +834,7 @@ _bodyData=jsonEncode(fileSchemaTestClass); /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> testBodyWithQueryParams({ required String query, required User user, @@ -868,13 +868,13 @@ _bodyData=jsonEncode(fileSchemaTestClass); try { _bodyData=jsonEncode(user); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, queryParameters: _queryParameters, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -906,7 +906,7 @@ _bodyData=jsonEncode(user); /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [ModelClient] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> testClientModel({ required ModelClient modelClient, CancelToken? cancelToken, @@ -935,12 +935,12 @@ _bodyData=jsonEncode(user); try { _bodyData=jsonEncode(modelClient); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -961,10 +961,10 @@ _bodyData=jsonEncode(modelClient); final rawData = _response.data; _responseData = rawData == null ? null : deserialize(rawData, 'ModelClient', growable: true); } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -1008,7 +1008,7 @@ _responseData = rawData == null ? null : deserialize(r /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> testEndpointParameters({ required num number, required double double_, @@ -1056,12 +1056,12 @@ _responseData = rawData == null ? null : deserialize(r try { } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -1100,7 +1100,7 @@ _responseData = rawData == null ? null : deserialize(r /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> testEnumParameters({ List? enumHeaderStringArray, String? enumHeaderString = '-efg', @@ -1147,13 +1147,13 @@ _responseData = rawData == null ? null : deserialize(r try { } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, queryParameters: _queryParameters, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -1190,7 +1190,7 @@ _responseData = rawData == null ? null : deserialize(r /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> testGroupParameters({ required int requiredStringGroup, required bool requiredBooleanGroup, @@ -1258,7 +1258,7 @@ _responseData = rawData == null ? null : deserialize(r /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> testInlineAdditionalProperties({ required Map requestBody, CancelToken? cancelToken, @@ -1287,12 +1287,12 @@ _responseData = rawData == null ? null : deserialize(r try { _bodyData=jsonEncode(requestBody); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -1324,7 +1324,7 @@ _bodyData=jsonEncode(requestBody); /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> testJsonFormData({ required String param, required String param2, @@ -1354,12 +1354,12 @@ _bodyData=jsonEncode(requestBody); try { } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -1396,7 +1396,7 @@ _bodyData=jsonEncode(requestBody); /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> testQueryParameterCollectionFormat({ required List pipe, required List ioutil, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/fake_classname_tags123_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/fake_classname_tags123_api.dart index 01bbff6dc8b..56ec33f1cac 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/fake_classname_tags123_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/fake_classname_tags123_api.dart @@ -30,7 +30,7 @@ class FakeClassnameTags123Api { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [ModelClient] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> testClassname({ required ModelClient modelClient, CancelToken? cancelToken, @@ -66,12 +66,12 @@ class FakeClassnameTags123Api { try { _bodyData=jsonEncode(modelClient); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -92,10 +92,10 @@ _bodyData=jsonEncode(modelClient); final rawData = _response.data; _responseData = rawData == null ? null : deserialize(rawData, 'ModelClient', growable: true); } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/pet_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/pet_api.dart index dfc66e720d9..ec20128ee1e 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/pet_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/pet_api.dart @@ -31,7 +31,7 @@ class PetApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> addPet({ required Pet pet, CancelToken? cancelToken, @@ -65,12 +65,12 @@ class PetApi { try { _bodyData=jsonEncode(pet); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -102,7 +102,7 @@ _bodyData=jsonEncode(pet); /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> deletePet({ required int petId, String? apiKey, @@ -156,7 +156,7 @@ _bodyData=jsonEncode(pet); /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [List] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future>> findPetsByStatus({ @Deprecated('status is deprecated') required List status, CancelToken? cancelToken, @@ -203,10 +203,10 @@ _bodyData=jsonEncode(pet); final rawData = _response.data; _responseData = rawData == null ? null : deserialize, Pet>(rawData, 'List', growable: true); } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -237,7 +237,7 @@ _responseData = rawData == null ? null : deserialize, Pet>(rawData, 'L /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [Set] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails @Deprecated('This operation has been deprecated') Future>> findPetsByTags({ required Set tags, @@ -285,10 +285,10 @@ _responseData = rawData == null ? null : deserialize, Pet>(rawData, 'L final rawData = _response.data; _responseData = rawData == null ? null : deserialize, Pet>(rawData, 'Set', growable: true); } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -319,7 +319,7 @@ _responseData = rawData == null ? null : deserialize, Pet>(rawData, 'Se /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [Pet] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> getPetById({ required int petId, CancelToken? cancelToken, @@ -363,10 +363,10 @@ _responseData = rawData == null ? null : deserialize, Pet>(rawData, 'Se final rawData = _response.data; _responseData = rawData == null ? null : deserialize(rawData, 'Pet', growable: true); } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -397,7 +397,7 @@ _responseData = rawData == null ? null : deserialize(rawData, 'Pet', g /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> updatePet({ required Pet pet, CancelToken? cancelToken, @@ -431,12 +431,12 @@ _responseData = rawData == null ? null : deserialize(rawData, 'Pet', g try { _bodyData=jsonEncode(pet); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -469,7 +469,7 @@ _bodyData=jsonEncode(pet); /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> updatePetWithForm({ required int petId, String? name, @@ -505,12 +505,12 @@ _bodyData=jsonEncode(pet); try { } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -543,7 +543,7 @@ _bodyData=jsonEncode(pet); /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [ApiResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> uploadFile({ required int petId, String? additionalMetadata, @@ -579,12 +579,12 @@ _bodyData=jsonEncode(pet); try { } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -605,10 +605,10 @@ _bodyData=jsonEncode(pet); final rawData = _response.data; _responseData = rawData == null ? null : deserialize(rawData, 'ApiResponse', growable: true); } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -641,7 +641,7 @@ _responseData = rawData == null ? null : deserialize(r /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [ApiResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> uploadFileWithRequiredFile({ required int petId, required MultipartFile requiredFile, @@ -677,12 +677,12 @@ _responseData = rawData == null ? null : deserialize(r try { } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -703,10 +703,10 @@ _responseData = rawData == null ? null : deserialize(r final rawData = _response.data; _responseData = rawData == null ? null : deserialize(rawData, 'ApiResponse', growable: true); } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/store_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/store_api.dart index db46a7db82e..23e8deceaea 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/store_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/store_api.dart @@ -30,7 +30,7 @@ class StoreApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> deleteOrder({ required String orderId, CancelToken? cancelToken, @@ -76,7 +76,7 @@ class StoreApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [Map] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future>> getInventory({ CancelToken? cancelToken, Map? headers, @@ -119,10 +119,10 @@ class StoreApi { final rawData = _response.data; _responseData = rawData == null ? null : deserialize, int>(rawData, 'Map', growable: true); } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -153,7 +153,7 @@ _responseData = rawData == null ? null : deserialize, int>(rawD /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [Order] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> getOrderById({ required int orderId, CancelToken? cancelToken, @@ -190,10 +190,10 @@ _responseData = rawData == null ? null : deserialize, int>(rawD final rawData = _response.data; _responseData = rawData == null ? null : deserialize(rawData, 'Order', growable: true); } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -224,7 +224,7 @@ _responseData = rawData == null ? null : deserialize(rawData, 'Ord /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [Order] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> placeOrder({ required Order order, CancelToken? cancelToken, @@ -253,12 +253,12 @@ _responseData = rawData == null ? null : deserialize(rawData, 'Ord try { _bodyData=jsonEncode(order); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -279,10 +279,10 @@ _bodyData=jsonEncode(order); final rawData = _response.data; _responseData = rawData == null ? null : deserialize(rawData, 'Order', growable: true); } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/user_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/user_api.dart index b0a587acd89..24bbeb48f74 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/user_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/user_api.dart @@ -30,7 +30,7 @@ class UserApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> createUser({ required User user, CancelToken? cancelToken, @@ -59,12 +59,12 @@ class UserApi { try { _bodyData=jsonEncode(user); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -95,7 +95,7 @@ _bodyData=jsonEncode(user); /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> createUsersWithArrayInput({ required List user, CancelToken? cancelToken, @@ -124,12 +124,12 @@ _bodyData=jsonEncode(user); try { _bodyData=jsonEncode(user); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -160,7 +160,7 @@ _bodyData=jsonEncode(user); /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> createUsersWithListInput({ required List user, CancelToken? cancelToken, @@ -189,12 +189,12 @@ _bodyData=jsonEncode(user); try { _bodyData=jsonEncode(user); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -225,7 +225,7 @@ _bodyData=jsonEncode(user); /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> deleteUser({ required String username, CancelToken? cancelToken, @@ -272,7 +272,7 @@ _bodyData=jsonEncode(user); /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [User] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> getUserByName({ required String username, CancelToken? cancelToken, @@ -309,10 +309,10 @@ _bodyData=jsonEncode(user); final rawData = _response.data; _responseData = rawData == null ? null : deserialize(rawData, 'User', growable: true); } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -344,7 +344,7 @@ _responseData = rawData == null ? null : deserialize(rawData, 'User' /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [String] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> loginUser({ required String username, required String password, @@ -388,10 +388,10 @@ _responseData = rawData == null ? null : deserialize(rawData, 'User' final rawData = _response.data; _responseData = rawData == null ? null : deserialize(rawData, 'String', growable: true); } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -421,7 +421,7 @@ _responseData = rawData == null ? null : deserialize(rawData, 'S /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> logoutUser({ CancelToken? cancelToken, Map? headers, @@ -468,7 +468,7 @@ _responseData = rawData == null ? null : deserialize(rawData, 'S /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> updateUser({ required String username, required User user, @@ -498,12 +498,12 @@ _responseData = rawData == null ? null : deserialize(rawData, 'S try { _bodyData=jsonEncode(user); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/cat_all_of.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/cat_all_of.dart new file mode 100644 index 00000000000..abb9dbc25e5 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/cat_all_of.dart @@ -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 json) => _$CatAllOfFromJson(json); + + Map toJson() => _$CatAllOfToJson(this); + + @override + String toString() { + return toJson().toString(); + } + +} + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/dog_all_of.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/dog_all_of.dart new file mode 100644 index 00000000000..19bd4c0267b --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/dog_all_of.dart @@ -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 json) => _$DogAllOfFromJson(json); + + Map toJson() => _$DogAllOfToJson(this); + + @override + String toString() { + return toJson().toString(); + } + +} + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/pubspec.yaml b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/pubspec.yaml index b8c8318dedc..d005a785419 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/pubspec.yaml +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/pubspec.yaml @@ -7,7 +7,7 @@ environment: sdk: '>=2.15.0 <3.0.0' dependencies: - dio: '^5.0.0' + dio: '^5.2.0' json_annotation: '^4.4.0' dev_dependencies: diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/README.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/README.md index e3944952f2d..db7ed486d76 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/README.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/README.md @@ -52,7 +52,7 @@ final ModelClient modelClient = ; // ModelClient | client model try { final response = await api.call123testSpecialTags(modelClient); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print("Exception when calling AnotherFakeApi->call123testSpecialTags: $e\n"); } diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/AnotherFakeApi.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/AnotherFakeApi.md index df89b0eb12a..36a94e6bb70 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/AnotherFakeApi.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/AnotherFakeApi.md @@ -29,7 +29,7 @@ final ModelClient modelClient = ; // ModelClient | client model try { final response = api.call123testSpecialTags(modelClient); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling AnotherFakeApi->call123testSpecialTags: $e\n'); } ``` diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/CatAllOf.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/CatAllOf.md new file mode 100644 index 00000000000..36b2ae0e8ab --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/CatAllOf.md @@ -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) + + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/DefaultApi.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/DefaultApi.md index 0bfa6194188..6abd2b44f9c 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/DefaultApi.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/DefaultApi.md @@ -26,7 +26,7 @@ final api = Openapi().getDefaultApi(); try { final response = api.fooGet(); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling DefaultApi->fooGet: $e\n'); } ``` diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/DogAllOf.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/DogAllOf.md new file mode 100644 index 00000000000..97a7c8fba49 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/DogAllOf.md @@ -0,0 +1,15 @@ +# openapi.model.DogAllOf + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**breed** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/FakeApi.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/FakeApi.md index a1c62eb1b6d..da73b9acb51 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/FakeApi.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/FakeApi.md @@ -45,7 +45,7 @@ final api = Openapi().getFakeApi(); try { final response = api.fakeBigDecimalMap(); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling FakeApi->fakeBigDecimalMap: $e\n'); } ``` @@ -82,7 +82,7 @@ final api = Openapi().getFakeApi(); try { final response = api.fakeHealthGet(); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling FakeApi->fakeHealthGet: $e\n'); } ``` @@ -121,7 +121,7 @@ final String header1 = header1_example; // String | header parameter try { api.fakeHttpSignatureTest(pet, query1, header1); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling FakeApi->fakeHttpSignatureTest: $e\n'); } ``` @@ -166,7 +166,7 @@ final bool body = true; // bool | Input boolean as post body try { final response = api.fakeOuterBooleanSerialize(body); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling FakeApi->fakeOuterBooleanSerialize: $e\n'); } ``` @@ -209,7 +209,7 @@ final OuterComposite outerComposite = ; // OuterComposite | Input composite as p try { final response = api.fakeOuterCompositeSerialize(outerComposite); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling FakeApi->fakeOuterCompositeSerialize: $e\n'); } ``` @@ -252,7 +252,7 @@ final num body = 8.14; // num | Input number as post body try { final response = api.fakeOuterNumberSerialize(body); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling FakeApi->fakeOuterNumberSerialize: $e\n'); } ``` @@ -295,7 +295,7 @@ final String body = body_example; // String | Input string as post body try { final response = api.fakeOuterStringSerialize(body); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling FakeApi->fakeOuterStringSerialize: $e\n'); } ``` @@ -338,7 +338,7 @@ final OuterObjectWithEnumProperty outerObjectWithEnumProperty = ; // OuterObject try { final response = api.fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling FakeApi->fakePropertyEnumIntegerSerialize: $e\n'); } ``` @@ -380,7 +380,7 @@ final MultipartFile body = BINARY_DATA_HERE; // MultipartFile | image to upload try { api.testBodyWithBinary(body); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling FakeApi->testBodyWithBinary: $e\n'); } ``` @@ -422,7 +422,7 @@ final FileSchemaTestClass fileSchemaTestClass = ; // FileSchemaTestClass | try { api.testBodyWithFileSchema(fileSchemaTestClass); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling FakeApi->testBodyWithFileSchema: $e\n'); } ``` @@ -463,7 +463,7 @@ final User user = ; // User | try { api.testBodyWithQueryParams(query, user); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling FakeApi->testBodyWithQueryParams: $e\n'); } ``` @@ -507,7 +507,7 @@ final ModelClient modelClient = ; // ModelClient | client model try { final response = api.testClientModel(modelClient); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling FakeApi->testClientModel: $e\n'); } ``` @@ -565,7 +565,7 @@ final String callback = callback_example; // String | None try { api.testEndpointParameters(number, double_, patternWithoutDelimiter, byte, integer, int32, int64, float, string, binary, date, dateTime, password, callback); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling FakeApi->testEndpointParameters: $e\n'); } ``` @@ -628,7 +628,7 @@ final String enumFormString = enumFormString_example; // String | Form parameter try { api.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling FakeApi->testEnumParameters: $e\n'); } ``` @@ -683,7 +683,7 @@ final int int64Group = 789; // int | Integer in group parameters try { api.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling FakeApi->testGroupParameters: $e\n'); } ``` @@ -730,7 +730,7 @@ final BuiltMap requestBody = ; // BuiltMap | req try { api.testInlineAdditionalProperties(requestBody); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling FakeApi->testInlineAdditionalProperties: $e\n'); } ``` @@ -773,7 +773,7 @@ final String param2 = param2_example; // String | field2 try { api.testJsonFormData(param, param2); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling FakeApi->testJsonFormData: $e\n'); } ``` @@ -822,7 +822,7 @@ final BuiltMap language = ; // BuiltMap | try { api.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling FakeApi->testQueryParameterCollectionFormat: $e\n'); } ``` diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/FakeClassnameTags123Api.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/FakeClassnameTags123Api.md index 35e244fbf21..645aebf399f 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/FakeClassnameTags123Api.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/FakeClassnameTags123Api.md @@ -33,7 +33,7 @@ final ModelClient modelClient = ; // ModelClient | client model try { final response = api.testClassname(modelClient); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling FakeClassnameTags123Api->testClassname: $e\n'); } ``` diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/PetApi.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/PetApi.md index 9ecef8bb7e1..2b7766eb60d 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/PetApi.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/PetApi.md @@ -38,7 +38,7 @@ final Pet pet = ; // Pet | Pet object that needs to be added to the store try { api.addPet(pet); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling PetApi->addPet: $e\n'); } ``` @@ -83,7 +83,7 @@ final String apiKey = apiKey_example; // String | try { api.deletePet(petId, apiKey); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling PetApi->deletePet: $e\n'); } ``` @@ -129,7 +129,7 @@ final BuiltList status = ; // BuiltList | Status values that nee try { final response = api.findPetsByStatus(status); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling PetApi->findPetsByStatus: $e\n'); } ``` @@ -174,7 +174,7 @@ final BuiltSet tags = ; // BuiltSet | Tags to filter by try { final response = api.findPetsByTags(tags); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling PetApi->findPetsByTags: $e\n'); } ``` @@ -221,7 +221,7 @@ final int petId = 789; // int | ID of pet to return try { final response = api.getPetById(petId); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling PetApi->getPetById: $e\n'); } ``` @@ -265,7 +265,7 @@ final Pet pet = ; // Pet | Pet object that needs to be added to the store try { api.updatePet(pet); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling PetApi->updatePet: $e\n'); } ``` @@ -311,7 +311,7 @@ final String status = status_example; // String | Updated status of the pet try { api.updatePetWithForm(petId, name, status); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling PetApi->updatePetWithForm: $e\n'); } ``` @@ -360,7 +360,7 @@ final MultipartFile file = BINARY_DATA_HERE; // MultipartFile | file to upload try { final response = api.uploadFile(petId, additionalMetadata, file); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling PetApi->uploadFile: $e\n'); } ``` @@ -409,7 +409,7 @@ final String additionalMetadata = additionalMetadata_example; // String | Additi try { final response = api.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling PetApi->uploadFileWithRequiredFile: $e\n'); } ``` diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/StoreApi.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/StoreApi.md index b46dc95a5ec..3616fd73437 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/StoreApi.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/StoreApi.md @@ -31,7 +31,7 @@ final String orderId = orderId_example; // String | ID of the order that needs t try { api.deleteOrder(orderId); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling StoreApi->deleteOrder: $e\n'); } ``` @@ -77,7 +77,7 @@ final api = Openapi().getStoreApi(); try { final response = api.getInventory(); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling StoreApi->getInventory: $e\n'); } ``` @@ -117,7 +117,7 @@ final int orderId = 789; // int | ID of pet that needs to be fetched try { final response = api.getOrderById(orderId); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling StoreApi->getOrderById: $e\n'); } ``` @@ -160,7 +160,7 @@ final Order order = ; // Order | order placed for purchasing the pet try { final response = api.placeOrder(order); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling StoreApi->placeOrder: $e\n'); } ``` diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/UserApi.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/UserApi.md index 987932d8b82..57189670896 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/UserApi.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/UserApi.md @@ -35,7 +35,7 @@ final User user = ; // User | Created user object try { api.createUser(user); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling UserApi->createUser: $e\n'); } ``` @@ -77,7 +77,7 @@ final BuiltList user = ; // BuiltList | List of user object try { api.createUsersWithArrayInput(user); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling UserApi->createUsersWithArrayInput: $e\n'); } ``` @@ -119,7 +119,7 @@ final BuiltList user = ; // BuiltList | List of user object try { api.createUsersWithListInput(user); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling UserApi->createUsersWithListInput: $e\n'); } ``` @@ -161,7 +161,7 @@ final String username = username_example; // String | The name that needs to be try { api.deleteUser(username); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling UserApi->deleteUser: $e\n'); } ``` @@ -204,7 +204,7 @@ final String username = username_example; // String | The name that needs to be try { final response = api.getUserByName(username); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling UserApi->getUserByName: $e\n'); } ``` @@ -248,7 +248,7 @@ final String password = password_example; // String | The password for login in try { final response = api.loginUser(username, password); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling UserApi->loginUser: $e\n'); } ``` @@ -290,7 +290,7 @@ final api = Openapi().getUserApi(); try { api.logoutUser(); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling UserApi->logoutUser: $e\n'); } ``` @@ -330,7 +330,7 @@ final User user = ; // User | Updated user object try { api.updateUser(username, user); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling UserApi->updateUser: $e\n'); } ``` diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/another_fake_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/another_fake_api.dart index 12452dc9943..37e9fdd31c7 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/another_fake_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/another_fake_api.dart @@ -30,7 +30,7 @@ class AnotherFakeApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [ModelClient] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> call123testSpecialTags({ required ModelClient modelClient, CancelToken? cancelToken, @@ -61,12 +61,12 @@ class AnotherFakeApi { _bodyData = _serializers.serialize(modelClient, specifiedType: _type); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -91,10 +91,10 @@ class AnotherFakeApi { ) as ModelClient; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/default_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/default_api.dart index 3a81b986ac9..2646f8a0b33 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/default_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/default_api.dart @@ -29,7 +29,7 @@ class DefaultApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [FooGetDefaultResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> fooGet({ CancelToken? cancelToken, Map? headers, @@ -69,10 +69,10 @@ class DefaultApi { ) as FooGetDefaultResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/fake_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/fake_api.dart index e72eb1d5bac..de710128f4b 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/fake_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/fake_api.dart @@ -41,7 +41,7 @@ class FakeApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [FakeBigDecimalMap200Response] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> fakeBigDecimalMap({ CancelToken? cancelToken, Map? headers, @@ -81,10 +81,10 @@ class FakeApi { ) as FakeBigDecimalMap200Response; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -114,7 +114,7 @@ class FakeApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [HealthCheckResult] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> fakeHealthGet({ CancelToken? cancelToken, Map? headers, @@ -154,10 +154,10 @@ class FakeApi { ) as HealthCheckResult; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -190,7 +190,7 @@ class FakeApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> fakeHttpSignatureTest({ required Pet pet, String? query1, @@ -234,13 +234,13 @@ class FakeApi { _bodyData = _serializers.serialize(pet, specifiedType: _type); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, queryParameters: _queryParameters, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -272,7 +272,7 @@ class FakeApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [bool] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> fakeOuterBooleanSerialize({ bool? body, CancelToken? cancelToken, @@ -302,12 +302,12 @@ class FakeApi { _bodyData = body; } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -329,10 +329,10 @@ class FakeApi { _responseData = rawResponse == null ? null : rawResponse as bool; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -363,7 +363,7 @@ class FakeApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [OuterComposite] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> fakeOuterCompositeSerialize({ OuterComposite? outerComposite, CancelToken? cancelToken, @@ -394,12 +394,12 @@ class FakeApi { _bodyData = outerComposite == null ? null : _serializers.serialize(outerComposite, specifiedType: _type); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -424,10 +424,10 @@ class FakeApi { ) as OuterComposite; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -458,7 +458,7 @@ class FakeApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [num] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> fakeOuterNumberSerialize({ num? body, CancelToken? cancelToken, @@ -488,12 +488,12 @@ class FakeApi { _bodyData = body; } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -515,10 +515,10 @@ class FakeApi { _responseData = rawResponse == null ? null : rawResponse as num; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -549,7 +549,7 @@ class FakeApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [String] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> fakeOuterStringSerialize({ String? body, CancelToken? cancelToken, @@ -579,12 +579,12 @@ class FakeApi { _bodyData = body; } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -606,10 +606,10 @@ class FakeApi { _responseData = rawResponse == null ? null : rawResponse as String; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -640,7 +640,7 @@ class FakeApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [OuterObjectWithEnumProperty] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> fakePropertyEnumIntegerSerialize({ required OuterObjectWithEnumProperty outerObjectWithEnumProperty, CancelToken? cancelToken, @@ -671,12 +671,12 @@ class FakeApi { _bodyData = _serializers.serialize(outerObjectWithEnumProperty, specifiedType: _type); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -701,10 +701,10 @@ class FakeApi { ) as OuterObjectWithEnumProperty; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -735,7 +735,7 @@ class FakeApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> testBodyWithBinary({ MultipartFile? body, CancelToken? cancelToken, @@ -765,12 +765,12 @@ class FakeApi { _bodyData = body?.finalize(); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -801,7 +801,7 @@ class FakeApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> testBodyWithFileSchema({ required FileSchemaTestClass fileSchemaTestClass, CancelToken? cancelToken, @@ -832,12 +832,12 @@ class FakeApi { _bodyData = _serializers.serialize(fileSchemaTestClass, specifiedType: _type); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -869,7 +869,7 @@ class FakeApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> testBodyWithQueryParams({ required String query, required User user, @@ -905,13 +905,13 @@ class FakeApi { _bodyData = _serializers.serialize(user, specifiedType: _type); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, queryParameters: _queryParameters, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -943,7 +943,7 @@ class FakeApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [ModelClient] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> testClientModel({ required ModelClient modelClient, CancelToken? cancelToken, @@ -974,12 +974,12 @@ class FakeApi { _bodyData = _serializers.serialize(modelClient, specifiedType: _type); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -1004,10 +1004,10 @@ class FakeApi { ) as ModelClient; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -1051,7 +1051,7 @@ class FakeApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> testEndpointParameters({ required num number, required double double_, @@ -1115,12 +1115,12 @@ class FakeApi { }; } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -1159,7 +1159,7 @@ class FakeApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> testEnumParameters({ BuiltList? enumHeaderStringArray, String? enumHeaderString = '-efg', @@ -1210,13 +1210,13 @@ class FakeApi { }; } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, queryParameters: _queryParameters, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -1253,7 +1253,7 @@ class FakeApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> testGroupParameters({ required int requiredStringGroup, required bool requiredBooleanGroup, @@ -1321,7 +1321,7 @@ class FakeApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> testInlineAdditionalProperties({ required BuiltMap requestBody, CancelToken? cancelToken, @@ -1352,12 +1352,12 @@ class FakeApi { _bodyData = _serializers.serialize(requestBody, specifiedType: _type); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -1389,7 +1389,7 @@ class FakeApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> testJsonFormData({ required String param, required String param2, @@ -1423,12 +1423,12 @@ class FakeApi { }; } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -1465,7 +1465,7 @@ class FakeApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> testQueryParameterCollectionFormat({ required BuiltList pipe, required BuiltList ioutil, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/fake_classname_tags123_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/fake_classname_tags123_api.dart index 8eab108825a..466b9356ee0 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/fake_classname_tags123_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/fake_classname_tags123_api.dart @@ -30,7 +30,7 @@ class FakeClassnameTags123Api { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [ModelClient] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> testClassname({ required ModelClient modelClient, CancelToken? cancelToken, @@ -68,12 +68,12 @@ class FakeClassnameTags123Api { _bodyData = _serializers.serialize(modelClient, specifiedType: _type); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -98,10 +98,10 @@ class FakeClassnameTags123Api { ) as ModelClient; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/pet_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/pet_api.dart index 8b7294d8d83..aad1031369c 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/pet_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/pet_api.dart @@ -33,7 +33,7 @@ class PetApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> addPet({ required Pet pet, CancelToken? cancelToken, @@ -69,12 +69,12 @@ class PetApi { _bodyData = _serializers.serialize(pet, specifiedType: _type); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -106,7 +106,7 @@ class PetApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> deletePet({ required int petId, String? apiKey, @@ -160,7 +160,7 @@ class PetApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [BuiltList] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future>> findPetsByStatus({ @Deprecated('status is deprecated') required BuiltList status, CancelToken? cancelToken, @@ -211,10 +211,10 @@ class PetApi { ) as BuiltList; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -245,7 +245,7 @@ class PetApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [BuiltSet] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails @Deprecated('This operation has been deprecated') Future>> findPetsByTags({ required BuiltSet tags, @@ -297,10 +297,10 @@ class PetApi { ) as BuiltSet; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -331,7 +331,7 @@ class PetApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [Pet] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> getPetById({ required int petId, CancelToken? cancelToken, @@ -379,10 +379,10 @@ class PetApi { ) as Pet; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -413,7 +413,7 @@ class PetApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> updatePet({ required Pet pet, CancelToken? cancelToken, @@ -449,12 +449,12 @@ class PetApi { _bodyData = _serializers.serialize(pet, specifiedType: _type); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -487,7 +487,7 @@ class PetApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> updatePetWithForm({ required int petId, String? name, @@ -527,12 +527,12 @@ class PetApi { }; } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -565,7 +565,7 @@ class PetApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [ApiResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> uploadFile({ required int petId, String? additionalMetadata, @@ -605,12 +605,12 @@ class PetApi { }); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -635,10 +635,10 @@ class PetApi { ) as ApiResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -671,7 +671,7 @@ class PetApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [ApiResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> uploadFileWithRequiredFile({ required int petId, required MultipartFile requiredFile, @@ -711,12 +711,12 @@ class PetApi { }); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -741,10 +741,10 @@ class PetApi { ) as ApiResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/store_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/store_api.dart index 751978e6198..46bb2237d4c 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/store_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/store_api.dart @@ -32,7 +32,7 @@ class StoreApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> deleteOrder({ required String orderId, CancelToken? cancelToken, @@ -78,7 +78,7 @@ class StoreApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [BuiltMap] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future>> getInventory({ CancelToken? cancelToken, Map? headers, @@ -125,10 +125,10 @@ class StoreApi { ) as BuiltMap; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -159,7 +159,7 @@ class StoreApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [Order] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> getOrderById({ required int orderId, CancelToken? cancelToken, @@ -200,10 +200,10 @@ class StoreApi { ) as Order; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -234,7 +234,7 @@ class StoreApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [Order] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> placeOrder({ required Order order, CancelToken? cancelToken, @@ -265,12 +265,12 @@ class StoreApi { _bodyData = _serializers.serialize(order, specifiedType: _type); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -295,10 +295,10 @@ class StoreApi { ) as Order; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/user_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/user_api.dart index 102f490f5e5..b4f78fd687b 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/user_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/user_api.dart @@ -32,7 +32,7 @@ class UserApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> createUser({ required User user, CancelToken? cancelToken, @@ -63,12 +63,12 @@ class UserApi { _bodyData = _serializers.serialize(user, specifiedType: _type); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -99,7 +99,7 @@ class UserApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> createUsersWithArrayInput({ required BuiltList user, CancelToken? cancelToken, @@ -130,12 +130,12 @@ class UserApi { _bodyData = _serializers.serialize(user, specifiedType: _type); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -166,7 +166,7 @@ class UserApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> createUsersWithListInput({ required BuiltList user, CancelToken? cancelToken, @@ -197,12 +197,12 @@ class UserApi { _bodyData = _serializers.serialize(user, specifiedType: _type); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -233,7 +233,7 @@ class UserApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> deleteUser({ required String username, CancelToken? cancelToken, @@ -280,7 +280,7 @@ class UserApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [User] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> getUserByName({ required String username, CancelToken? cancelToken, @@ -321,10 +321,10 @@ class UserApi { ) as User; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -356,7 +356,7 @@ class UserApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [String] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> loginUser({ required String username, required String password, @@ -401,10 +401,10 @@ class UserApi { _responseData = rawResponse == null ? null : rawResponse as String; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -434,7 +434,7 @@ class UserApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> logoutUser({ CancelToken? cancelToken, Map? headers, @@ -481,7 +481,7 @@ class UserApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> updateUser({ required String username, required User user, @@ -513,12 +513,12 @@ class UserApi { _bodyData = _serializers.serialize(user, specifiedType: _type); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/cat_all_of.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/cat_all_of.dart new file mode 100644 index 00000000000..02d9cce0cae --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/cat_all_of.dart @@ -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 get serializer => _$CatAllOfSerializer(); +} + +class _$CatAllOfSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [CatAllOf]; + + @override + final String wireName = r'CatAllOf'; + + Iterable _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 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 serializedList, + required CatAllOfBuilder result, + required List 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).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/dog_all_of.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/dog_all_of.dart new file mode 100644 index 00000000000..bd52567fa60 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/dog_all_of.dart @@ -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 get serializer => _$DogAllOfSerializer(); +} + +class _$DogAllOfSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [DogAllOf]; + + @override + final String wireName = r'DogAllOf'; + + Iterable _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 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 serializedList, + required DogAllOfBuilder result, + required List 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).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/pubspec.yaml b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/pubspec.yaml index 3cc6bce70ed..de93663746d 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/pubspec.yaml +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/pubspec.yaml @@ -7,7 +7,7 @@ environment: sdk: '>=2.15.0 <3.0.0' dependencies: - dio: '^5.0.0' + dio: '^5.2.0' one_of: '>=1.5.0 <2.0.0' one_of_serializer: '>=1.5.0 <2.0.0' built_value: '>=8.4.0 <9.0.0' diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake_tests/pubspec.yaml b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake_tests/pubspec.yaml index 5079f6732cd..8475e362b88 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake_tests/pubspec.yaml +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake_tests/pubspec.yaml @@ -10,7 +10,7 @@ environment: dev_dependencies: built_collection: 5.1.1 built_value: 8.4.3 - dio: 5.0.0 + dio: 5.2.1 http_mock_adapter: 0.4.2 mockito: 5.2.0 openapi: diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake_tests/test/api_util_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake_tests/test/api_util_test.dart index 4b0bf354cca..1a8ff5203c1 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake_tests/test/api_util_test.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake_tests/test/api_util_test.dart @@ -264,7 +264,7 @@ void main() { .build(), const FullType(Cat), ), - '{"className":"cat","color":"black","declawed":false}', + '{"color":"black","declawed":false,"className":"cat"}', ); }); }); diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/CatAllOf.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/CatAllOf.md new file mode 100644 index 00000000000..36b2ae0e8ab --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/CatAllOf.md @@ -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) + + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/DogAllOf.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/DogAllOf.md new file mode 100644 index 00000000000..97a7c8fba49 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/DogAllOf.md @@ -0,0 +1,15 @@ +# openapi.model.DogAllOf + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**breed** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/cat_all_of.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/cat_all_of.dart new file mode 100644 index 00000000000..9d090b4068a --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/cat_all_of.dart @@ -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 toJson() { + final json = {}; + 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(); + + // 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(json, r'declawed'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + 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 mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // 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> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + 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 = { + }; +} + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/dog_all_of.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/dog_all_of.dart new file mode 100644 index 00000000000..5398d4b03fd --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/dog_all_of.dart @@ -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 toJson() { + final json = {}; + 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(); + + // 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(json, r'breed'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + 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 mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // 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> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + 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 = { + }; +} + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/cat_all_of_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/cat_all_of_test.dart new file mode 100644 index 00000000000..5675a6d1aea --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/cat_all_of_test.dart @@ -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 + }); + + + }); + +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/dog_all_of_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/dog_all_of_test.dart new file mode 100644 index 00000000000..8df5e7ff934 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/dog_all_of_test.dart @@ -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 + }); + + + }); + +}