From 6f6d4f8c02fd459de5aaee4755f64d0f82dedc9e Mon Sep 17 00:00:00 2001 From: Josh Burton Date: Fri, 17 Dec 2021 15:36:42 +1300 Subject: [PATCH] [dart-dio-next] Removes dioLibrary option (#10931) As there is no longer a fork of the dio library this option can be removed --- ...ext-dio-http-petstore-client-lib-fake.yaml | 11 - docs/generators/dart-dio-next.md | 1 - .../languages/DartDioNextClientCodegen.java | 54 +- .../resources/dart/libraries/dio/api.mustache | 2 +- .../dart/libraries/dio/api_client.mustache | 2 +- .../libraries/dio/auth/api_key_auth.mustache | 2 +- .../dart/libraries/dio/auth/auth.mustache | 2 +- .../libraries/dio/auth/basic_auth.mustache | 2 +- .../libraries/dio/auth/bearer_auth.mustache | 2 +- .../dart/libraries/dio/auth/oauth.mustache | 2 +- .../dart/libraries/dio/pubspec.mustache | 5 - .../built_value/api_util.mustache | 4 +- .../dio/DartDioNextClientCodegenTest.java | 20 - .../dio/DartDioNextClientOptionsTest.java | 1 - .../DartDioNextClientOptionsProvider.java | 1 - pom.xml | 1 - .../.gitignore | 41 - .../.openapi-generator-ignore | 23 - .../.openapi-generator/FILES | 121 -- .../.openapi-generator/VERSION | 1 - .../README.md | 200 --- .../analysis_options.yaml | 9 - .../doc/AdditionalPropertiesClass.md | 16 - .../doc/Animal.md | 16 - .../doc/AnotherFakeApi.md | 57 - .../doc/ApiResponse.md | 17 - .../doc/ArrayOfArrayOfNumberOnly.md | 15 - .../doc/ArrayOfNumberOnly.md | 15 - .../doc/ArrayTest.md | 17 - .../doc/Capitalization.md | 20 - .../doc/Cat.md | 17 - .../doc/CatAllOf.md | 15 - .../doc/Category.md | 16 - .../doc/ClassModel.md | 15 - .../doc/DefaultApi.md | 51 - .../doc/DeprecatedObject.md | 15 - .../doc/Dog.md | 17 - .../doc/DogAllOf.md | 15 - .../doc/EnumArrays.md | 16 - .../doc/EnumTest.md | 22 - .../doc/FakeApi.md | 816 ---------- .../doc/FakeClassnameTags123Api.md | 61 - .../doc/FileSchemaTestClass.md | 16 - .../doc/Foo.md | 15 - .../doc/FormatTest.md | 30 - .../doc/HasOnlyReadOnly.md | 16 - .../doc/HealthCheckResult.md | 15 - .../doc/InlineResponseDefault.md | 15 - .../doc/MapTest.md | 18 - ...dPropertiesAndAdditionalPropertiesClass.md | 17 - .../doc/Model200Response.md | 16 - .../doc/ModelClient.md | 15 - .../doc/ModelEnumClass.md | 14 - .../doc/ModelFile.md | 15 - .../doc/ModelList.md | 15 - .../doc/ModelReturn.md | 15 - .../doc/Name.md | 18 - .../doc/NullableClass.md | 26 - .../doc/NumberOnly.md | 15 - .../doc/ObjectWithDeprecatedFields.md | 18 - .../doc/Order.md | 20 - .../doc/OuterComposite.md | 17 - .../doc/OuterEnum.md | 14 - .../doc/OuterEnumDefaultValue.md | 14 - .../doc/OuterEnumInteger.md | 14 - .../doc/OuterEnumIntegerDefaultValue.md | 14 - .../doc/OuterObjectWithEnumProperty.md | 15 - .../doc/Pet.md | 20 - .../doc/PetApi.md | 427 ----- .../doc/ReadOnlyFirst.md | 16 - .../doc/SpecialModelName.md | 15 - .../doc/StoreApi.md | 186 --- .../doc/Tag.md | 16 - .../doc/User.md | 22 - .../doc/UserApi.md | 349 ---- .../lib/openapi.dart | 65 - .../lib/src/api.dart | 115 -- .../lib/src/api/another_fake_api.dart | 113 -- .../lib/src/api/default_api.dart | 92 -- .../lib/src/api/fake_api.dart | 1417 ----------------- .../src/api/fake_classname_tags123_api.dart | 120 -- .../lib/src/api/pet_api.dart | 755 --------- .../lib/src/api/store_api.dart | 314 ---- .../lib/src/api/user_api.dart | 532 ------- .../lib/src/api_util.dart | 78 - .../lib/src/auth/api_key_auth.dart | 30 - .../lib/src/auth/auth.dart | 18 - .../lib/src/auth/basic_auth.dart | 37 - .../lib/src/auth/bearer_auth.dart | 26 - .../lib/src/auth/oauth.dart | 26 - .../lib/src/date_serializer.dart | 31 - .../model/additional_properties_class.dart | 87 - .../lib/src/model/animal.dart | 85 - .../lib/src/model/api_response.dart | 101 -- .../model/array_of_array_of_number_only.dart | 72 - .../lib/src/model/array_of_number_only.dart | 72 - .../lib/src/model/array_test.dart | 103 -- .../lib/src/model/capitalization.dart | 147 -- .../lib/src/model/cat.dart | 104 -- .../lib/src/model/cat_all_of.dart | 71 - .../lib/src/model/category.dart | 85 - .../lib/src/model/class_model.dart | 71 - .../lib/src/model/date.dart | 70 - .../lib/src/model/deprecated_object.dart | 71 - .../lib/src/model/dog.dart | 104 -- .../lib/src/model/dog_all_of.dart | 71 - .../lib/src/model/enum_arrays.dart | 119 -- .../lib/src/model/enum_test.dart | 252 --- .../lib/src/model/file_schema_test_class.dart | 88 - .../lib/src/model/foo.dart | 72 - .../lib/src/model/format_test.dart | 292 ---- .../lib/src/model/has_only_read_only.dart | 86 - .../lib/src/model/health_check_result.dart | 72 - .../src/model/inline_response_default.dart | 72 - .../lib/src/model/map_test.dart | 133 -- ...rties_and_additional_properties_class.dart | 103 -- .../lib/src/model/model200_response.dart | 86 - .../lib/src/model/model_client.dart | 71 - .../lib/src/model/model_enum_class.dart | 35 - .../lib/src/model/model_file.dart | 72 - .../lib/src/model/model_list.dart | 71 - .../lib/src/model/model_return.dart | 71 - .../lib/src/model/name.dart | 114 -- .../lib/src/model/nullable_class.dart | 249 --- .../lib/src/model/number_only.dart | 71 - .../model/object_with_deprecated_fields.dart | 118 -- .../lib/src/model/order.dart | 170 -- .../lib/src/model/outer_composite.dart | 101 -- .../lib/src/model/outer_enum.dart | 35 - .../src/model/outer_enum_default_value.dart | 35 - .../lib/src/model/outer_enum_integer.dart | 35 - .../outer_enum_integer_default_value.dart | 35 - .../outer_object_with_enum_property.dart | 71 - .../lib/src/model/pet.dart | 167 -- .../lib/src/model/read_only_first.dart | 86 - .../lib/src/model/special_model_name.dart | 71 - .../lib/src/model/tag.dart | 86 - .../lib/src/model/user.dart | 177 -- .../lib/src/serializers.dart | 146 -- .../dio_http_petstore_client_lib_fake/pom.xml | 88 - .../pubspec.yaml | 17 - .../additional_properties_class_test.dart | 21 - .../test/animal_test.dart | 21 - .../test/another_fake_api_test.dart | 20 - .../test/api_response_test.dart | 26 - .../array_of_array_of_number_only_test.dart | 16 - .../test/array_of_number_only_test.dart | 16 - .../test/array_test_test.dart | 26 - .../test/capitalization_test.dart | 42 - .../test/cat_all_of_test.dart | 16 - .../test/cat_test.dart | 26 - .../test/category_test.dart | 21 - .../test/class_model_test.dart | 16 - .../test/default_api_test.dart | 16 - .../test/deprecated_object_test.dart | 16 - .../test/dog_all_of_test.dart | 16 - .../test/dog_test.dart | 26 - .../test/enum_arrays_test.dart | 21 - .../test/enum_test_test.dart | 51 - .../test/fake_api_test.dart | 136 -- .../test/fake_classname_tags123_api_test.dart | 20 - .../test/file_schema_test_class_test.dart | 21 - .../test/foo_test.dart | 16 - .../test/format_test_test.dart | 93 -- .../test/has_only_read_only_test.dart | 21 - .../test/health_check_result_test.dart | 16 - .../test/inline_response_default_test.dart | 16 - .../test/map_test_test.dart | 31 - ..._and_additional_properties_class_test.dart | 26 - .../test/model200_response_test.dart | 21 - .../test/model_client_test.dart | 16 - .../test/model_enum_class_test.dart | 9 - .../test/model_file_test.dart | 17 - .../test/model_list_test.dart | 16 - .../test/model_return_test.dart | 16 - .../test/name_test.dart | 31 - .../test/nullable_class_test.dart | 71 - .../test/number_only_test.dart | 16 - .../object_with_deprecated_fields_test.dart | 31 - .../test/order_test.dart | 42 - .../test/outer_composite_test.dart | 26 - .../test/outer_enum_default_value_test.dart | 9 - ...outer_enum_integer_default_value_test.dart | 9 - .../test/outer_enum_integer_test.dart | 9 - .../test/outer_enum_test.dart | 9 - .../outer_object_with_enum_property_test.dart | 16 - .../test/pet_api_test.dart | 80 - .../test/pet_test.dart | 42 - .../test/read_only_first_test.dart | 21 - .../test/special_model_name_test.dart | 16 - .../test/store_api_test.dart | 45 - .../test/tag_test.dart | 21 - .../test/user_api_test.dart | 73 - .../test/user_test.dart | 52 - 194 files changed, 12 insertions(+), 13385 deletions(-) delete mode 100644 bin/configs/dart-dio-next-dio-http-petstore-client-lib-fake.yaml delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/.gitignore delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/.openapi-generator-ignore delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/.openapi-generator/FILES delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/.openapi-generator/VERSION delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/README.md delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/analysis_options.yaml delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/AdditionalPropertiesClass.md delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Animal.md delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/AnotherFakeApi.md delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ApiResponse.md delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ArrayOfArrayOfNumberOnly.md delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ArrayOfNumberOnly.md delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ArrayTest.md delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Capitalization.md delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Cat.md delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/CatAllOf.md delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Category.md delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ClassModel.md delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/DefaultApi.md delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/DeprecatedObject.md delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Dog.md delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/DogAllOf.md delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/EnumArrays.md delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/EnumTest.md delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/FakeApi.md delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/FakeClassnameTags123Api.md delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/FileSchemaTestClass.md delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Foo.md delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/FormatTest.md delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/HasOnlyReadOnly.md delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/HealthCheckResult.md delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/InlineResponseDefault.md delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/MapTest.md delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/MixedPropertiesAndAdditionalPropertiesClass.md delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Model200Response.md delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ModelClient.md delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ModelEnumClass.md delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ModelFile.md delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ModelList.md delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ModelReturn.md delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Name.md delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/NullableClass.md delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/NumberOnly.md delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ObjectWithDeprecatedFields.md delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Order.md delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/OuterComposite.md delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/OuterEnum.md delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/OuterEnumDefaultValue.md delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/OuterEnumInteger.md delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/OuterEnumIntegerDefaultValue.md delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/OuterObjectWithEnumProperty.md delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Pet.md delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/PetApi.md delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ReadOnlyFirst.md delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/SpecialModelName.md delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/StoreApi.md delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Tag.md delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/User.md delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/UserApi.md delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/openapi.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/api.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/api/another_fake_api.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/api/default_api.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/api/fake_api.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/api/fake_classname_tags123_api.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/api/pet_api.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/api/store_api.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/api/user_api.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/api_util.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/auth/api_key_auth.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/auth/auth.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/auth/basic_auth.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/auth/bearer_auth.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/auth/oauth.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/date_serializer.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/additional_properties_class.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/animal.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/api_response.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/array_of_array_of_number_only.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/array_of_number_only.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/array_test.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/capitalization.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/cat.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/cat_all_of.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/category.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/class_model.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/date.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/deprecated_object.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/dog.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/dog_all_of.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/enum_arrays.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/enum_test.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/file_schema_test_class.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/foo.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/format_test.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/has_only_read_only.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/health_check_result.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/inline_response_default.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/map_test.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/mixed_properties_and_additional_properties_class.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/model200_response.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/model_client.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/model_enum_class.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/model_file.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/model_list.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/model_return.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/name.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/nullable_class.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/number_only.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/object_with_deprecated_fields.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/order.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/outer_composite.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/outer_enum.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/outer_enum_default_value.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/outer_enum_integer.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/outer_enum_integer_default_value.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/outer_object_with_enum_property.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/pet.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/read_only_first.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/special_model_name.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/tag.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/user.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/serializers.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/pom.xml delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/pubspec.yaml delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/additional_properties_class_test.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/animal_test.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/another_fake_api_test.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/api_response_test.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/array_of_array_of_number_only_test.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/array_of_number_only_test.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/array_test_test.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/capitalization_test.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/cat_all_of_test.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/cat_test.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/category_test.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/class_model_test.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/default_api_test.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/deprecated_object_test.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/dog_all_of_test.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/dog_test.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/enum_arrays_test.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/enum_test_test.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/fake_api_test.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/fake_classname_tags123_api_test.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/file_schema_test_class_test.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/foo_test.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/format_test_test.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/has_only_read_only_test.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/health_check_result_test.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/inline_response_default_test.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/map_test_test.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/mixed_properties_and_additional_properties_class_test.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/model200_response_test.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/model_client_test.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/model_enum_class_test.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/model_file_test.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/model_list_test.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/model_return_test.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/name_test.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/nullable_class_test.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/number_only_test.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/object_with_deprecated_fields_test.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/order_test.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/outer_composite_test.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/outer_enum_default_value_test.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/outer_enum_integer_default_value_test.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/outer_enum_integer_test.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/outer_enum_test.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/outer_object_with_enum_property_test.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/pet_api_test.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/pet_test.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/read_only_first_test.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/special_model_name_test.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/store_api_test.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/tag_test.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/user_api_test.dart delete mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/user_test.dart diff --git a/bin/configs/dart-dio-next-dio-http-petstore-client-lib-fake.yaml b/bin/configs/dart-dio-next-dio-http-petstore-client-lib-fake.yaml deleted file mode 100644 index eb33c1a7f2f..00000000000 --- a/bin/configs/dart-dio-next-dio-http-petstore-client-lib-fake.yaml +++ /dev/null @@ -1,11 +0,0 @@ -generatorName: dart-dio-next -outputDir: samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake -inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -templateDir: modules/openapi-generator/src/main/resources/dart/libraries/dio -typeMappings: - Client: "ModelClient" - File: "ModelFile" - EnumClass: "ModelEnumClass" -additionalProperties: - hideGenerationTimestamp: "true" - dioLibrary: "dio_http" diff --git a/docs/generators/dart-dio-next.md b/docs/generators/dart-dio-next.md index ac9d15dc069..d644e35b04a 100644 --- a/docs/generators/dart-dio-next.md +++ b/docs/generators/dart-dio-next.md @@ -9,7 +9,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |dateLibrary|Specify Date library|
**core**
[DEFAULT] Dart core library (DateTime)
**timemachine**
Time Machine is date and time library for Flutter, Web, and Server with support for timezones, calendars, cultures, formatting and parsing.
|core| -|dioLibrary|Specify Dio library|
**dio_http**
dio_http 5.x
**dio**
[DEFAULT] dio 4.x
|dio| |disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioNextClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioNextClientCodegen.java index 06322152120..5b9f96a2162 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioNextClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioNextClientCodegen.java @@ -39,11 +39,6 @@ public class DartDioNextClientCodegen extends AbstractDartCodegen { private final Logger LOGGER = LoggerFactory.getLogger(DartDioNextClientCodegen.class); - public static final String DIO_LIBRARY = "dioLibrary"; - public static final String DIO_ORIGINAL = "dio"; - public static final String DIO_HTTP = "dio_http"; - public static final String DIO_LIBRARY_DEFAULT = DIO_ORIGINAL; - public static final String DATE_LIBRARY = "dateLibrary"; public static final String DATE_LIBRARY_CORE = "core"; public static final String DATE_LIBRARY_TIME_MACHINE = "timemachine"; @@ -52,13 +47,11 @@ public class DartDioNextClientCodegen extends AbstractDartCodegen { public static final String SERIALIZATION_LIBRARY_BUILT_VALUE = "built_value"; public static final String SERIALIZATION_LIBRARY_DEFAULT = SERIALIZATION_LIBRARY_BUILT_VALUE; + private static final String DIO_IMPORT = "package:dio/dio.dart"; private static final String CLIENT_NAME = "clientName"; private String dateLibrary; - private String dioLibrary; - private String dioImport; - private String clientName; public DartDioNextClientCodegen() { @@ -87,7 +80,6 @@ public class DartDioNextClientCodegen extends AbstractDartCodegen { serializationLibrary.setDefault(SERIALIZATION_LIBRARY_DEFAULT); cliOptions.add(serializationLibrary); - // Date Library Option final CliOption dateOption = CliOption.newString(DATE_LIBRARY, "Specify Date library"); dateOption.setDefault(DATE_LIBRARY_DEFAULT); @@ -96,16 +88,6 @@ public class DartDioNextClientCodegen extends AbstractDartCodegen { dateOptions.put(DATE_LIBRARY_TIME_MACHINE, "Time Machine is date and time library for Flutter, Web, and Server with support for timezones, calendars, cultures, formatting and parsing."); dateOption.setEnum(dateOptions); cliOptions.add(dateOption); - - // Dio Library Option - final CliOption dioOption = CliOption.newString(DIO_LIBRARY, "Specify Dio library"); - dioOption.setDefault(DIO_LIBRARY_DEFAULT); - - final Map dioOptions = new HashMap<>(); - dioOptions.put(DIO_ORIGINAL, "[DEFAULT] dio 4.x"); - dioOptions.put(DIO_HTTP, "dio_http 5.x"); - dioOption.setEnum(dioOptions); - cliOptions.add(dioOption); } public String getDateLibrary() { @@ -116,14 +98,6 @@ public class DartDioNextClientCodegen extends AbstractDartCodegen { this.dateLibrary = library; } - public String getDioLibrary() { - return dioLibrary; - } - - public void setDioLibrary(String library) { - this.dioLibrary = library; - } - public String getClientName() { return clientName; } @@ -163,12 +137,6 @@ public class DartDioNextClientCodegen extends AbstractDartCodegen { } setDateLibrary(additionalProperties.get(DATE_LIBRARY).toString()); - if (!additionalProperties.containsKey(DIO_LIBRARY)) { - additionalProperties.put(DIO_LIBRARY, DIO_LIBRARY_DEFAULT); - LOGGER.debug("Dio library not set, using default {}", DIO_LIBRARY_DEFAULT); - } - setDioLibrary(additionalProperties.get(DIO_LIBRARY).toString()); - if (!additionalProperties.containsKey(CLIENT_NAME)) { final String name = org.openapitools.codegen.utils.StringUtils.camelize(pubName); additionalProperties.put(CLIENT_NAME, name); @@ -194,31 +162,15 @@ public class DartDioNextClientCodegen extends AbstractDartCodegen { supportingFiles.add(new SupportingFile("auth/oauth.mustache", authFolder, "oauth.dart")); supportingFiles.add(new SupportingFile("auth/auth.mustache", authFolder, "auth.dart")); - configureDioLibrary(); configureSerializationLibrary(srcFolder); configureDateLibrary(srcFolder); } - private void configureDioLibrary() { - switch (dioLibrary) { - case DIO_HTTP: - dioImport = "package:dio_http/dio_http.dart"; - break; - case DIO_ORIGINAL: - default: - dioImport = "package:dio/dio.dart"; - break; - } - } - private void configureSerializationLibrary(String srcFolder) { switch (library) { default: case SERIALIZATION_LIBRARY_BUILT_VALUE: additionalProperties.put("useBuiltValue", "true"); - additionalProperties.put("useDioHttp", dioLibrary.equals(DIO_HTTP)); - additionalProperties.put("dioImport", dioImport); - additionalProperties.put("dioLibrary", dioLibrary); configureSerializationLibraryBuiltValue(srcFolder); break; } @@ -243,7 +195,7 @@ public class DartDioNextClientCodegen extends AbstractDartCodegen { imports.put("BuiltMap", "package:built_collection/built_collection.dart"); imports.put("JsonObject", "package:built_value/json_object.dart"); imports.put("Uint8List", "dart:typed_data"); - imports.put("MultipartFile", dioImport); + imports.put("MultipartFile", DIO_IMPORT); } private void configureDateLibrary(String srcFolder) { @@ -442,7 +394,7 @@ public class DartDioNextClientCodegen extends AbstractDartCodegen { for (String modelImport : originalImports) { if (imports.containsKey(modelImport)) { String i = imports.get(modelImport); - if (Objects.equals(i, dioImport) && !isModel) { + if (Objects.equals(i, DIO_IMPORT) && !isModel) { // Don't add imports to operations that are already imported continue; } 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 ce040b2d8a6..01663cfd23c 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 @@ -2,7 +2,7 @@ import 'dart:async'; {{#useBuiltValue}}import 'package:built_value/serializer.dart';{{/useBuiltValue}} -import '{{dioImport}}'; +import 'package:dio/dio.dart'; {{#operations}} {{#imports}}import '{{.}}'; diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/api_client.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/api_client.mustache index 97b998b1d67..35fabd973d1 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/api_client.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/api_client.mustache @@ -1,5 +1,5 @@ {{>header}} -import '{{dioImport}}';{{#useBuiltValue}} +import 'package:dio/dio.dart';{{#useBuiltValue}} import 'package:built_value/serializer.dart'; import 'package:{{pubName}}/src/serializers.dart';{{/useBuiltValue}} import 'package:{{pubName}}/src/auth/api_key_auth.dart'; diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/auth/api_key_auth.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/auth/api_key_auth.mustache index 71d10a81855..2174d159630 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/auth/api_key_auth.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/auth/api_key_auth.mustache @@ -1,6 +1,6 @@ {{>header}} -import '{{dioImport}}'; +import 'package:dio/dio.dart'; import 'package:{{pubName}}/src/auth/auth.dart'; class ApiKeyAuthInterceptor extends AuthInterceptor { diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/auth/auth.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/auth/auth.mustache index 7c275784c05..a266e2384c7 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/auth/auth.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/auth/auth.mustache @@ -1,5 +1,5 @@ {{>header}} -import '{{dioImport}}'; +import 'package:dio/dio.dart'; abstract class AuthInterceptor extends Interceptor { /// Get auth information on given route for the given type. diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/auth/basic_auth.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/auth/basic_auth.mustache index 3472d1cd228..c286274c3a2 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/auth/basic_auth.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/auth/basic_auth.mustache @@ -1,7 +1,7 @@ {{>header}} import 'dart:convert'; -import '{{dioImport}}'; +import 'package:dio/dio.dart'; import 'package:{{pubName}}/src/auth/auth.dart'; class BasicAuthInfo { diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/auth/bearer_auth.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/auth/bearer_auth.mustache index 7aa011d9169..626c7d238d0 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/auth/bearer_auth.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/auth/bearer_auth.mustache @@ -1,5 +1,5 @@ {{>header}} -import '{{dioImport}}'; +import 'package:dio/dio.dart'; import 'package:{{pubName}}/src/auth/auth.dart'; class BearerAuthInterceptor extends AuthInterceptor { diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/auth/oauth.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/auth/oauth.mustache index fccc6610f4e..4f7b79655af 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/auth/oauth.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/auth/oauth.mustache @@ -1,5 +1,5 @@ {{>header}} -import '{{dioImport}}'; +import 'package:dio/dio.dart'; import 'package:{{pubName}}/src/auth/auth.dart'; class OAuthInterceptor extends AuthInterceptor { 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 d480e663acc..6bf879a4897 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 @@ -7,12 +7,7 @@ environment: sdk: '>=2.12.0 <3.0.0' dependencies: -{{#useDioHttp}} - dio_http: '>=5.0.0 <6.0.0' -{{/useDioHttp}} -{{^useDioHttp}} dio: '>=4.0.0 <5.0.0' -{{/useDioHttp}} {{#useBuiltValue}} built_value: '>=8.1.0 <9.0.0' built_collection: '>=5.1.0 <6.0.0' diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/api_util.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/api_util.mustache index 4cdede63a0e..fb5ab08aeda 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/api_util.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/api_util.mustache @@ -4,8 +4,8 @@ import 'dart:typed_data'; import 'package:built_collection/built_collection.dart'; import 'package:built_value/serializer.dart'; -import '{{dioImport}}'; -import 'package:{{dioLibrary}}/src/parameter.dart'; +import 'package:dio/dio.dart'; +import 'package:dio/src/parameter.dart'; /// Format the given form parameter object into something that Dio can handle. /// Returns primitive or String. diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/dio/DartDioNextClientCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/dio/DartDioNextClientCodegenTest.java index 7166ac04044..1d0e81d2360 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/dio/DartDioNextClientCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/dio/DartDioNextClientCodegenTest.java @@ -84,24 +84,4 @@ public class DartDioNextClientCodegenTest { } } - - @Test - public void testInitialDioLibraryValues() throws Exception { - final DartDioNextClientCodegen codegen = new DartDioNextClientCodegen(); - codegen.processOpts(); - - Assert.assertEquals(codegen.additionalProperties().get(DartDioNextClientCodegen.DIO_LIBRARY), DartDioNextClientCodegen.DIO_LIBRARY_DEFAULT); - Assert.assertEquals(codegen.getDioLibrary(), DartDioNextClientCodegen.DIO_LIBRARY_DEFAULT); - } - - @Test - public void testAdditionalPropertiesPutForDioLibraryValues() throws Exception { - final DartDioNextClientCodegen codegen = new DartDioNextClientCodegen(); - codegen.additionalProperties().put(DartDioNextClientCodegen.DIO_LIBRARY, DartDioNextClientCodegen.DIO_HTTP); - codegen.processOpts(); - - Assert.assertEquals(codegen.additionalProperties().get(DartDioNextClientCodegen.DIO_LIBRARY), DartDioNextClientCodegen.DIO_HTTP); - Assert.assertEquals(codegen.getDioLibrary(), DartDioNextClientCodegen.DIO_HTTP); - } - } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/dio/DartDioNextClientOptionsTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/dio/DartDioNextClientOptionsTest.java index 210c8290cd6..f2237e4fbaa 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/dio/DartDioNextClientOptionsTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/dio/DartDioNextClientOptionsTest.java @@ -50,7 +50,6 @@ public class DartDioNextClientOptionsTest extends AbstractOptionsTest { verify(clientCodegen).setSourceFolder(DartDioNextClientOptionsProvider.SOURCE_FOLDER_VALUE); verify(clientCodegen).setUseEnumExtension(Boolean.parseBoolean(DartDioNextClientOptionsProvider.USE_ENUM_EXTENSION)); verify(clientCodegen).setDateLibrary(DartDioNextClientCodegen.DATE_LIBRARY_DEFAULT); - verify(clientCodegen).setDioLibrary(DartDioNextClientCodegen.DIO_LIBRARY_DEFAULT); verify(clientCodegen).setLibrary(DartDioNextClientCodegen.SERIALIZATION_LIBRARY_DEFAULT); } } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/DartDioNextClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/DartDioNextClientOptionsProvider.java index 2b4840d7d42..b03f2a97214 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/DartDioNextClientOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/DartDioNextClientOptionsProvider.java @@ -58,7 +58,6 @@ public class DartDioNextClientOptionsProvider implements OptionsProvider { .put(DartDioNextClientCodegen.PUB_HOMEPAGE, PUB_HOMEPAGE_VALUE) .put(CodegenConstants.SERIALIZATION_LIBRARY, DartDioNextClientCodegen.SERIALIZATION_LIBRARY_DEFAULT) .put(DartDioNextClientCodegen.DATE_LIBRARY, DartDioNextClientCodegen.DATE_LIBRARY_DEFAULT) - .put(DartDioNextClientCodegen.DIO_LIBRARY, DartDioNextClientCodegen.DIO_LIBRARY_DEFAULT) .put(CodegenConstants.SOURCE_FOLDER, SOURCE_FOLDER_VALUE) .put(DartDioNextClientCodegen.USE_ENUM_EXTENSION, USE_ENUM_EXTENSION) .put(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, ALLOW_UNICODE_IDENTIFIERS_VALUE) diff --git a/pom.xml b/pom.xml index c96acc02e49..6dd63afc4b4 100644 --- a/pom.xml +++ b/pom.xml @@ -1402,7 +1402,6 @@ samples/openapi3/client/petstore/dart2/petstore_client_lib samples/openapi3/client/petstore/dart2/petstore samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake - samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/.gitignore b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/.gitignore deleted file mode 100644 index 4298cdcbd1a..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/.gitignore +++ /dev/null @@ -1,41 +0,0 @@ -# See https://dart.dev/guides/libraries/private-files - -# Files and directories created by pub -.dart_tool/ -.buildlog -.packages -.project -.pub/ -build/ -**/packages/ - -# Files created by dart2js -# (Most Dart developers will use pub build to compile Dart, use/modify these -# rules if you intend to use dart2js directly -# Convention is to use extension '.dart.js' for Dart compiled to Javascript to -# differentiate from explicit Javascript files) -*.dart.js -*.part.js -*.js.deps -*.js.map -*.info.json - -# Directory created by dartdoc -doc/api/ - -# Don't commit pubspec lock file -# (Library packages only! Remove pattern if developing an application package) -pubspec.lock - -# Don’t commit files and directories created by other development environments. -# For example, if your development environment creates any of the following files, -# consider putting them in a global ignore file: - -# IntelliJ -*.iml -*.ipr -*.iws -.idea/ - -# Mac -.DS_Store diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/.openapi-generator-ignore b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/.openapi-generator-ignore deleted file mode 100644 index 7484ee590a3..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/.openapi-generator/FILES b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/.openapi-generator/FILES deleted file mode 100644 index ae28fd24bea..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/.openapi-generator/FILES +++ /dev/null @@ -1,121 +0,0 @@ -.gitignore -README.md -analysis_options.yaml -doc/AdditionalPropertiesClass.md -doc/Animal.md -doc/AnotherFakeApi.md -doc/ApiResponse.md -doc/ArrayOfArrayOfNumberOnly.md -doc/ArrayOfNumberOnly.md -doc/ArrayTest.md -doc/Capitalization.md -doc/Cat.md -doc/CatAllOf.md -doc/Category.md -doc/ClassModel.md -doc/DefaultApi.md -doc/DeprecatedObject.md -doc/Dog.md -doc/DogAllOf.md -doc/EnumArrays.md -doc/EnumTest.md -doc/FakeApi.md -doc/FakeClassnameTags123Api.md -doc/FileSchemaTestClass.md -doc/Foo.md -doc/FormatTest.md -doc/HasOnlyReadOnly.md -doc/HealthCheckResult.md -doc/InlineResponseDefault.md -doc/MapTest.md -doc/MixedPropertiesAndAdditionalPropertiesClass.md -doc/Model200Response.md -doc/ModelClient.md -doc/ModelEnumClass.md -doc/ModelFile.md -doc/ModelList.md -doc/ModelReturn.md -doc/Name.md -doc/NullableClass.md -doc/NumberOnly.md -doc/ObjectWithDeprecatedFields.md -doc/Order.md -doc/OuterComposite.md -doc/OuterEnum.md -doc/OuterEnumDefaultValue.md -doc/OuterEnumInteger.md -doc/OuterEnumIntegerDefaultValue.md -doc/OuterObjectWithEnumProperty.md -doc/Pet.md -doc/PetApi.md -doc/ReadOnlyFirst.md -doc/SpecialModelName.md -doc/StoreApi.md -doc/Tag.md -doc/User.md -doc/UserApi.md -lib/openapi.dart -lib/src/api.dart -lib/src/api/another_fake_api.dart -lib/src/api/default_api.dart -lib/src/api/fake_api.dart -lib/src/api/fake_classname_tags123_api.dart -lib/src/api/pet_api.dart -lib/src/api/store_api.dart -lib/src/api/user_api.dart -lib/src/api_util.dart -lib/src/auth/api_key_auth.dart -lib/src/auth/auth.dart -lib/src/auth/basic_auth.dart -lib/src/auth/bearer_auth.dart -lib/src/auth/oauth.dart -lib/src/date_serializer.dart -lib/src/model/additional_properties_class.dart -lib/src/model/animal.dart -lib/src/model/api_response.dart -lib/src/model/array_of_array_of_number_only.dart -lib/src/model/array_of_number_only.dart -lib/src/model/array_test.dart -lib/src/model/capitalization.dart -lib/src/model/cat.dart -lib/src/model/cat_all_of.dart -lib/src/model/category.dart -lib/src/model/class_model.dart -lib/src/model/date.dart -lib/src/model/deprecated_object.dart -lib/src/model/dog.dart -lib/src/model/dog_all_of.dart -lib/src/model/enum_arrays.dart -lib/src/model/enum_test.dart -lib/src/model/file_schema_test_class.dart -lib/src/model/foo.dart -lib/src/model/format_test.dart -lib/src/model/has_only_read_only.dart -lib/src/model/health_check_result.dart -lib/src/model/inline_response_default.dart -lib/src/model/map_test.dart -lib/src/model/mixed_properties_and_additional_properties_class.dart -lib/src/model/model200_response.dart -lib/src/model/model_client.dart -lib/src/model/model_enum_class.dart -lib/src/model/model_file.dart -lib/src/model/model_list.dart -lib/src/model/model_return.dart -lib/src/model/name.dart -lib/src/model/nullable_class.dart -lib/src/model/number_only.dart -lib/src/model/object_with_deprecated_fields.dart -lib/src/model/order.dart -lib/src/model/outer_composite.dart -lib/src/model/outer_enum.dart -lib/src/model/outer_enum_default_value.dart -lib/src/model/outer_enum_integer.dart -lib/src/model/outer_enum_integer_default_value.dart -lib/src/model/outer_object_with_enum_property.dart -lib/src/model/pet.dart -lib/src/model/read_only_first.dart -lib/src/model/special_model_name.dart -lib/src/model/tag.dart -lib/src/model/user.dart -lib/src/serializers.dart -pubspec.yaml diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/.openapi-generator/VERSION b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/.openapi-generator/VERSION deleted file mode 100644 index 4077803655c..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -5.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/README.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/README.md deleted file mode 100644 index 52553e236b0..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/README.md +++ /dev/null @@ -1,200 +0,0 @@ -# openapi (EXPERIMENTAL) -This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - -This Dart package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - -- API version: 1.0.0 -- Build package: org.openapitools.codegen.languages.DartDioNextClientCodegen - -## Requirements - -* Dart 2.12.0 or later OR Flutter 1.26.0 or later -* Dio 4.0.0+ - -## Installation & Usage - -### pub.dev -To use the package from [pub.dev](https://pub.dev), please include the following in pubspec.yaml -```yaml -dependencies: - openapi: 1.0.0 -``` - -### Github -If this Dart package is published to Github, please include the following in pubspec.yaml -```yaml -dependencies: - openapi: - git: - url: https://github.com/GIT_USER_ID/GIT_REPO_ID.git - #ref: main -``` - -### Local development -To use the package from your local drive, please include the following in pubspec.yaml -```yaml -dependencies: - openapi: - path: /path/to/openapi -``` - -## Getting Started - -Please follow the [installation procedure](#installation--usage) and then run the following: - -```dart -import 'package:openapi/openapi.dart'; - - -final api = Openapi().getAnotherFakeApi(); -final ModelClient modelClient = ; // ModelClient | client model - -try { - final response = await api.call123testSpecialTags(modelClient); - print(response); -} catch on DioError (e) { - print("Exception when calling AnotherFakeApi->call123testSpecialTags: $e\n"); -} - -``` - -## Documentation for API Endpoints - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -[*AnotherFakeApi*](doc/AnotherFakeApi.md) | [**call123testSpecialTags**](doc/AnotherFakeApi.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags -[*DefaultApi*](doc/DefaultApi.md) | [**fooGet**](doc/DefaultApi.md#fooget) | **GET** /foo | -[*FakeApi*](doc/FakeApi.md) | [**fakeHealthGet**](doc/FakeApi.md#fakehealthget) | **GET** /fake/health | Health check endpoint -[*FakeApi*](doc/FakeApi.md) | [**fakeHttpSignatureTest**](doc/FakeApi.md#fakehttpsignaturetest) | **GET** /fake/http-signature-test | test http signature authentication -[*FakeApi*](doc/FakeApi.md) | [**fakeOuterBooleanSerialize**](doc/FakeApi.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | -[*FakeApi*](doc/FakeApi.md) | [**fakeOuterCompositeSerialize**](doc/FakeApi.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | -[*FakeApi*](doc/FakeApi.md) | [**fakeOuterNumberSerialize**](doc/FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number | -[*FakeApi*](doc/FakeApi.md) | [**fakeOuterStringSerialize**](doc/FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string | -[*FakeApi*](doc/FakeApi.md) | [**fakePropertyEnumIntegerSerialize**](doc/FakeApi.md#fakepropertyenumintegerserialize) | **POST** /fake/property/enum-int | -[*FakeApi*](doc/FakeApi.md) | [**testBodyWithBinary**](doc/FakeApi.md#testbodywithbinary) | **PUT** /fake/body-with-binary | -[*FakeApi*](doc/FakeApi.md) | [**testBodyWithFileSchema**](doc/FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | -[*FakeApi*](doc/FakeApi.md) | [**testBodyWithQueryParams**](doc/FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | -[*FakeApi*](doc/FakeApi.md) | [**testClientModel**](doc/FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model -[*FakeApi*](doc/FakeApi.md) | [**testEndpointParameters**](doc/FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -[*FakeApi*](doc/FakeApi.md) | [**testEnumParameters**](doc/FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters -[*FakeApi*](doc/FakeApi.md) | [**testGroupParameters**](doc/FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) -[*FakeApi*](doc/FakeApi.md) | [**testInlineAdditionalProperties**](doc/FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties -[*FakeApi*](doc/FakeApi.md) | [**testJsonFormData**](doc/FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data -[*FakeApi*](doc/FakeApi.md) | [**testQueryParameterCollectionFormat**](doc/FakeApi.md#testqueryparametercollectionformat) | **PUT** /fake/test-query-parameters | -[*FakeClassnameTags123Api*](doc/FakeClassnameTags123Api.md) | [**testClassname**](doc/FakeClassnameTags123Api.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case -[*PetApi*](doc/PetApi.md) | [**addPet**](doc/PetApi.md#addpet) | **POST** /pet | Add a new pet to the store -[*PetApi*](doc/PetApi.md) | [**deletePet**](doc/PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet -[*PetApi*](doc/PetApi.md) | [**findPetsByStatus**](doc/PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status -[*PetApi*](doc/PetApi.md) | [**findPetsByTags**](doc/PetApi.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags -[*PetApi*](doc/PetApi.md) | [**getPetById**](doc/PetApi.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID -[*PetApi*](doc/PetApi.md) | [**updatePet**](doc/PetApi.md#updatepet) | **PUT** /pet | Update an existing pet -[*PetApi*](doc/PetApi.md) | [**updatePetWithForm**](doc/PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data -[*PetApi*](doc/PetApi.md) | [**uploadFile**](doc/PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image -[*PetApi*](doc/PetApi.md) | [**uploadFileWithRequiredFile**](doc/PetApi.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) -[*StoreApi*](doc/StoreApi.md) | [**deleteOrder**](doc/StoreApi.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID -[*StoreApi*](doc/StoreApi.md) | [**getInventory**](doc/StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status -[*StoreApi*](doc/StoreApi.md) | [**getOrderById**](doc/StoreApi.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID -[*StoreApi*](doc/StoreApi.md) | [**placeOrder**](doc/StoreApi.md#placeorder) | **POST** /store/order | Place an order for a pet -[*UserApi*](doc/UserApi.md) | [**createUser**](doc/UserApi.md#createuser) | **POST** /user | Create user -[*UserApi*](doc/UserApi.md) | [**createUsersWithArrayInput**](doc/UserApi.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array -[*UserApi*](doc/UserApi.md) | [**createUsersWithListInput**](doc/UserApi.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array -[*UserApi*](doc/UserApi.md) | [**deleteUser**](doc/UserApi.md#deleteuser) | **DELETE** /user/{username} | Delete user -[*UserApi*](doc/UserApi.md) | [**getUserByName**](doc/UserApi.md#getuserbyname) | **GET** /user/{username} | Get user by user name -[*UserApi*](doc/UserApi.md) | [**loginUser**](doc/UserApi.md#loginuser) | **GET** /user/login | Logs user into the system -[*UserApi*](doc/UserApi.md) | [**logoutUser**](doc/UserApi.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session -[*UserApi*](doc/UserApi.md) | [**updateUser**](doc/UserApi.md#updateuser) | **PUT** /user/{username} | Updated user - - -## Documentation For Models - - - [AdditionalPropertiesClass](doc/AdditionalPropertiesClass.md) - - [Animal](doc/Animal.md) - - [ApiResponse](doc/ApiResponse.md) - - [ArrayOfArrayOfNumberOnly](doc/ArrayOfArrayOfNumberOnly.md) - - [ArrayOfNumberOnly](doc/ArrayOfNumberOnly.md) - - [ArrayTest](doc/ArrayTest.md) - - [Capitalization](doc/Capitalization.md) - - [Cat](doc/Cat.md) - - [CatAllOf](doc/CatAllOf.md) - - [Category](doc/Category.md) - - [ClassModel](doc/ClassModel.md) - - [DeprecatedObject](doc/DeprecatedObject.md) - - [Dog](doc/Dog.md) - - [DogAllOf](doc/DogAllOf.md) - - [EnumArrays](doc/EnumArrays.md) - - [EnumTest](doc/EnumTest.md) - - [FileSchemaTestClass](doc/FileSchemaTestClass.md) - - [Foo](doc/Foo.md) - - [FormatTest](doc/FormatTest.md) - - [HasOnlyReadOnly](doc/HasOnlyReadOnly.md) - - [HealthCheckResult](doc/HealthCheckResult.md) - - [InlineResponseDefault](doc/InlineResponseDefault.md) - - [MapTest](doc/MapTest.md) - - [MixedPropertiesAndAdditionalPropertiesClass](doc/MixedPropertiesAndAdditionalPropertiesClass.md) - - [Model200Response](doc/Model200Response.md) - - [ModelClient](doc/ModelClient.md) - - [ModelEnumClass](doc/ModelEnumClass.md) - - [ModelFile](doc/ModelFile.md) - - [ModelList](doc/ModelList.md) - - [ModelReturn](doc/ModelReturn.md) - - [Name](doc/Name.md) - - [NullableClass](doc/NullableClass.md) - - [NumberOnly](doc/NumberOnly.md) - - [ObjectWithDeprecatedFields](doc/ObjectWithDeprecatedFields.md) - - [Order](doc/Order.md) - - [OuterComposite](doc/OuterComposite.md) - - [OuterEnum](doc/OuterEnum.md) - - [OuterEnumDefaultValue](doc/OuterEnumDefaultValue.md) - - [OuterEnumInteger](doc/OuterEnumInteger.md) - - [OuterEnumIntegerDefaultValue](doc/OuterEnumIntegerDefaultValue.md) - - [OuterObjectWithEnumProperty](doc/OuterObjectWithEnumProperty.md) - - [Pet](doc/Pet.md) - - [ReadOnlyFirst](doc/ReadOnlyFirst.md) - - [SpecialModelName](doc/SpecialModelName.md) - - [Tag](doc/Tag.md) - - [User](doc/User.md) - - -## Documentation For Authorization - - -## api_key - -- **Type**: API key -- **API key parameter name**: api_key -- **Location**: HTTP header - -## api_key_query - -- **Type**: API key -- **API key parameter name**: api_key_query -- **Location**: URL query string - -## bearer_test - -- **Type**: HTTP basic authentication - -## http_basic_test - -- **Type**: HTTP basic authentication - -## http_signature_test - -- **Type**: HTTP basic authentication - -## petstore_auth - -- **Type**: OAuth -- **Flow**: implicit -- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog -- **Scopes**: - - **write:pets**: modify pets in your account - - **read:pets**: read your pets - - -## Author - - - diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/analysis_options.yaml b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/analysis_options.yaml deleted file mode 100644 index a611887d3ac..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/analysis_options.yaml +++ /dev/null @@ -1,9 +0,0 @@ -analyzer: - language: - strict-inference: true - strict-raw-types: true - strong-mode: - implicit-dynamic: false - implicit-casts: false - exclude: - - test/*.dart diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/AdditionalPropertiesClass.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/AdditionalPropertiesClass.md deleted file mode 100644 index f9f7857894d..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/AdditionalPropertiesClass.md +++ /dev/null @@ -1,16 +0,0 @@ -# openapi.model.AdditionalPropertiesClass - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mapProperty** | **BuiltMap<String, String>** | | [optional] -**mapOfMapProperty** | [**BuiltMap<String, BuiltMap<String, String>>**](BuiltMap.md) | | [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-next/dio_http_petstore_client_lib_fake/doc/Animal.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Animal.md deleted file mode 100644 index 415b56e9bc2..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Animal.md +++ /dev/null @@ -1,16 +0,0 @@ -# openapi.model.Animal - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**className** | **String** | | -**color** | **String** | | [optional] [default to 'red'] - -[[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-next/dio_http_petstore_client_lib_fake/doc/AnotherFakeApi.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/AnotherFakeApi.md deleted file mode 100644 index df89b0eb12a..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/AnotherFakeApi.md +++ /dev/null @@ -1,57 +0,0 @@ -# openapi.api.AnotherFakeApi - -## Load the API package -```dart -import 'package:openapi/api.dart'; -``` - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**call123testSpecialTags**](AnotherFakeApi.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags - - -# **call123testSpecialTags** -> ModelClient call123testSpecialTags(modelClient) - -To test special tags - -To test special tags and operation ID starting with number - -### Example -```dart -import 'package:openapi/api.dart'; - -final api = Openapi().getAnotherFakeApi(); -final ModelClient modelClient = ; // ModelClient | client model - -try { - final response = api.call123testSpecialTags(modelClient); - print(response); -} catch on DioError (e) { - print('Exception when calling AnotherFakeApi->call123testSpecialTags: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **modelClient** | [**ModelClient**](ModelClient.md)| client model | - -### Return type - -[**ModelClient**](ModelClient.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ApiResponse.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ApiResponse.md deleted file mode 100644 index 7ad5da0f89e..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ApiResponse.md +++ /dev/null @@ -1,17 +0,0 @@ -# openapi.model.ApiResponse - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | **int** | | [optional] -**type** | **String** | | [optional] -**message** | **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-next/dio_http_petstore_client_lib_fake/doc/ArrayOfArrayOfNumberOnly.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ArrayOfArrayOfNumberOnly.md deleted file mode 100644 index d1a272ab602..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ArrayOfArrayOfNumberOnly.md +++ /dev/null @@ -1,15 +0,0 @@ -# openapi.model.ArrayOfArrayOfNumberOnly - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayArrayNumber** | [**BuiltList<BuiltList<num>>**](BuiltList.md) | | [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-next/dio_http_petstore_client_lib_fake/doc/ArrayOfNumberOnly.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ArrayOfNumberOnly.md deleted file mode 100644 index 94b60f272fd..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ArrayOfNumberOnly.md +++ /dev/null @@ -1,15 +0,0 @@ -# openapi.model.ArrayOfNumberOnly - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayNumber** | **BuiltList<num>** | | [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-next/dio_http_petstore_client_lib_fake/doc/ArrayTest.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ArrayTest.md deleted file mode 100644 index 0813d4fa93c..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ArrayTest.md +++ /dev/null @@ -1,17 +0,0 @@ -# openapi.model.ArrayTest - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayOfString** | **BuiltList<String>** | | [optional] -**arrayArrayOfInteger** | [**BuiltList<BuiltList<int>>**](BuiltList.md) | | [optional] -**arrayArrayOfModel** | [**BuiltList<BuiltList<ReadOnlyFirst>>**](BuiltList.md) | | [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-next/dio_http_petstore_client_lib_fake/doc/Capitalization.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Capitalization.md deleted file mode 100644 index 4a07b4eb820..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Capitalization.md +++ /dev/null @@ -1,20 +0,0 @@ -# openapi.model.Capitalization - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**smallCamel** | **String** | | [optional] -**capitalCamel** | **String** | | [optional] -**smallSnake** | **String** | | [optional] -**capitalSnake** | **String** | | [optional] -**sCAETHFlowPoints** | **String** | | [optional] -**ATT_NAME** | **String** | Name of the pet | [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-next/dio_http_petstore_client_lib_fake/doc/Cat.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Cat.md deleted file mode 100644 index 6552eea4b43..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Cat.md +++ /dev/null @@ -1,17 +0,0 @@ -# openapi.model.Cat - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**className** | **String** | | -**color** | **String** | | [optional] [default to 'red'] -**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-next/dio_http_petstore_client_lib_fake/doc/CatAllOf.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/CatAllOf.md deleted file mode 100644 index 36b2ae0e8ab..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/CatAllOf.md +++ /dev/null @@ -1,15 +0,0 @@ -# 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-next/dio_http_petstore_client_lib_fake/doc/Category.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Category.md deleted file mode 100644 index ae6bc52e89d..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Category.md +++ /dev/null @@ -1,16 +0,0 @@ -# openapi.model.Category - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | [optional] -**name** | **String** | | [default to 'default-name'] - -[[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-next/dio_http_petstore_client_lib_fake/doc/ClassModel.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ClassModel.md deleted file mode 100644 index 13ae5d3a470..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ClassModel.md +++ /dev/null @@ -1,15 +0,0 @@ -# openapi.model.ClassModel - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**class_** | **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-next/dio_http_petstore_client_lib_fake/doc/DefaultApi.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/DefaultApi.md deleted file mode 100644 index f1753b62ee8..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/DefaultApi.md +++ /dev/null @@ -1,51 +0,0 @@ -# openapi.api.DefaultApi - -## Load the API package -```dart -import 'package:openapi/api.dart'; -``` - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**fooGet**](DefaultApi.md#fooget) | **GET** /foo | - - -# **fooGet** -> InlineResponseDefault fooGet() - - - -### Example -```dart -import 'package:openapi/api.dart'; - -final api = Openapi().getDefaultApi(); - -try { - final response = api.fooGet(); - print(response); -} catch on DioError (e) { - print('Exception when calling DefaultApi->fooGet: $e\n'); -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**InlineResponseDefault**](InlineResponseDefault.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/DeprecatedObject.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/DeprecatedObject.md deleted file mode 100644 index bf2ef67a26f..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/DeprecatedObject.md +++ /dev/null @@ -1,15 +0,0 @@ -# openapi.model.DeprecatedObject - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **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-next/dio_http_petstore_client_lib_fake/doc/Dog.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Dog.md deleted file mode 100644 index d36439b767b..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Dog.md +++ /dev/null @@ -1,17 +0,0 @@ -# openapi.model.Dog - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**className** | **String** | | -**color** | **String** | | [optional] [default to 'red'] -**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-next/dio_http_petstore_client_lib_fake/doc/DogAllOf.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/DogAllOf.md deleted file mode 100644 index 97a7c8fba49..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/DogAllOf.md +++ /dev/null @@ -1,15 +0,0 @@ -# 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-next/dio_http_petstore_client_lib_fake/doc/EnumArrays.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/EnumArrays.md deleted file mode 100644 index 06170bb8f51..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/EnumArrays.md +++ /dev/null @@ -1,16 +0,0 @@ -# openapi.model.EnumArrays - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**justSymbol** | **String** | | [optional] -**arrayEnum** | **BuiltList<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-next/dio_http_petstore_client_lib_fake/doc/EnumTest.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/EnumTest.md deleted file mode 100644 index 7c24fe2347b..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/EnumTest.md +++ /dev/null @@ -1,22 +0,0 @@ -# openapi.model.EnumTest - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**enumString** | **String** | | [optional] -**enumStringRequired** | **String** | | -**enumInteger** | **int** | | [optional] -**enumNumber** | **double** | | [optional] -**outerEnum** | [**OuterEnum**](OuterEnum.md) | | [optional] -**outerEnumInteger** | [**OuterEnumInteger**](OuterEnumInteger.md) | | [optional] -**outerEnumDefaultValue** | [**OuterEnumDefaultValue**](OuterEnumDefaultValue.md) | | [optional] -**outerEnumIntegerDefaultValue** | [**OuterEnumIntegerDefaultValue**](OuterEnumIntegerDefaultValue.md) | | [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-next/dio_http_petstore_client_lib_fake/doc/FakeApi.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/FakeApi.md deleted file mode 100644 index 740e5ee6683..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/FakeApi.md +++ /dev/null @@ -1,816 +0,0 @@ -# openapi.api.FakeApi - -## Load the API package -```dart -import 'package:openapi/api.dart'; -``` - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**fakeHealthGet**](FakeApi.md#fakehealthget) | **GET** /fake/health | Health check endpoint -[**fakeHttpSignatureTest**](FakeApi.md#fakehttpsignaturetest) | **GET** /fake/http-signature-test | test http signature authentication -[**fakeOuterBooleanSerialize**](FakeApi.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | -[**fakeOuterCompositeSerialize**](FakeApi.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | -[**fakeOuterNumberSerialize**](FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number | -[**fakeOuterStringSerialize**](FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string | -[**fakePropertyEnumIntegerSerialize**](FakeApi.md#fakepropertyenumintegerserialize) | **POST** /fake/property/enum-int | -[**testBodyWithBinary**](FakeApi.md#testbodywithbinary) | **PUT** /fake/body-with-binary | -[**testBodyWithFileSchema**](FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | -[**testBodyWithQueryParams**](FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | -[**testClientModel**](FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model -[**testEndpointParameters**](FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -[**testEnumParameters**](FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters -[**testGroupParameters**](FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) -[**testInlineAdditionalProperties**](FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties -[**testJsonFormData**](FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data -[**testQueryParameterCollectionFormat**](FakeApi.md#testqueryparametercollectionformat) | **PUT** /fake/test-query-parameters | - - -# **fakeHealthGet** -> HealthCheckResult fakeHealthGet() - -Health check endpoint - -### Example -```dart -import 'package:openapi/api.dart'; - -final api = Openapi().getFakeApi(); - -try { - final response = api.fakeHealthGet(); - print(response); -} catch on DioError (e) { - print('Exception when calling FakeApi->fakeHealthGet: $e\n'); -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**HealthCheckResult**](HealthCheckResult.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **fakeHttpSignatureTest** -> fakeHttpSignatureTest(pet, query1, header1) - -test http signature authentication - -### Example -```dart -import 'package:openapi/api.dart'; -// TODO Configure HTTP basic authorization: http_signature_test -//defaultApiClient.getAuthentication('http_signature_test').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('http_signature_test').password = 'YOUR_PASSWORD'; - -final api = Openapi().getFakeApi(); -final Pet pet = ; // Pet | Pet object that needs to be added to the store -final String query1 = query1_example; // String | query parameter -final String header1 = header1_example; // String | header parameter - -try { - api.fakeHttpSignatureTest(pet, query1, header1); -} catch on DioError (e) { - print('Exception when calling FakeApi->fakeHttpSignatureTest: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | - **query1** | **String**| query parameter | [optional] - **header1** | **String**| header parameter | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[http_signature_test](../README.md#http_signature_test) - -### HTTP request headers - - - **Content-Type**: application/json, application/xml - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **fakeOuterBooleanSerialize** -> bool fakeOuterBooleanSerialize(body) - - - -Test serialization of outer boolean types - -### Example -```dart -import 'package:openapi/api.dart'; - -final api = Openapi().getFakeApi(); -final bool body = true; // bool | Input boolean as post body - -try { - final response = api.fakeOuterBooleanSerialize(body); - print(response); -} catch on DioError (e) { - print('Exception when calling FakeApi->fakeOuterBooleanSerialize: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **bool**| Input boolean as post body | [optional] - -### Return type - -**bool** - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: */* - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **fakeOuterCompositeSerialize** -> OuterComposite fakeOuterCompositeSerialize(outerComposite) - - - -Test serialization of object with outer number type - -### Example -```dart -import 'package:openapi/api.dart'; - -final api = Openapi().getFakeApi(); -final OuterComposite outerComposite = ; // OuterComposite | Input composite as post body - -try { - final response = api.fakeOuterCompositeSerialize(outerComposite); - print(response); -} catch on DioError (e) { - print('Exception when calling FakeApi->fakeOuterCompositeSerialize: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **outerComposite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] - -### Return type - -[**OuterComposite**](OuterComposite.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: */* - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **fakeOuterNumberSerialize** -> num fakeOuterNumberSerialize(body) - - - -Test serialization of outer number types - -### Example -```dart -import 'package:openapi/api.dart'; - -final api = Openapi().getFakeApi(); -final num body = 8.14; // num | Input number as post body - -try { - final response = api.fakeOuterNumberSerialize(body); - print(response); -} catch on DioError (e) { - print('Exception when calling FakeApi->fakeOuterNumberSerialize: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **num**| Input number as post body | [optional] - -### Return type - -**num** - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: */* - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **fakeOuterStringSerialize** -> String fakeOuterStringSerialize(body) - - - -Test serialization of outer string types - -### Example -```dart -import 'package:openapi/api.dart'; - -final api = Openapi().getFakeApi(); -final String body = body_example; // String | Input string as post body - -try { - final response = api.fakeOuterStringSerialize(body); - print(response); -} catch on DioError (e) { - print('Exception when calling FakeApi->fakeOuterStringSerialize: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **String**| Input string as post body | [optional] - -### Return type - -**String** - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: */* - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **fakePropertyEnumIntegerSerialize** -> OuterObjectWithEnumProperty fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty) - - - -Test serialization of enum (int) properties with examples - -### Example -```dart -import 'package:openapi/api.dart'; - -final api = Openapi().getFakeApi(); -final OuterObjectWithEnumProperty outerObjectWithEnumProperty = ; // OuterObjectWithEnumProperty | Input enum (int) as post body - -try { - final response = api.fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty); - print(response); -} catch on DioError (e) { - print('Exception when calling FakeApi->fakePropertyEnumIntegerSerialize: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **outerObjectWithEnumProperty** | [**OuterObjectWithEnumProperty**](OuterObjectWithEnumProperty.md)| Input enum (int) as post body | - -### Return type - -[**OuterObjectWithEnumProperty**](OuterObjectWithEnumProperty.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: */* - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **testBodyWithBinary** -> testBodyWithBinary(body) - - - -For this test, the body has to be a binary file. - -### Example -```dart -import 'package:openapi/api.dart'; - -final api = Openapi().getFakeApi(); -final MultipartFile body = BINARY_DATA_HERE; // MultipartFile | image to upload - -try { - api.testBodyWithBinary(body); -} catch on DioError (e) { - print('Exception when calling FakeApi->testBodyWithBinary: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **MultipartFile**| image to upload | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: image/png - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **testBodyWithFileSchema** -> testBodyWithFileSchema(fileSchemaTestClass) - - - -For this test, the body for this request must reference a schema named `File`. - -### Example -```dart -import 'package:openapi/api.dart'; - -final api = Openapi().getFakeApi(); -final FileSchemaTestClass fileSchemaTestClass = ; // FileSchemaTestClass | - -try { - api.testBodyWithFileSchema(fileSchemaTestClass); -} catch on DioError (e) { - print('Exception when calling FakeApi->testBodyWithFileSchema: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **fileSchemaTestClass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **testBodyWithQueryParams** -> testBodyWithQueryParams(query, user) - - - -### Example -```dart -import 'package:openapi/api.dart'; - -final api = Openapi().getFakeApi(); -final String query = query_example; // String | -final User user = ; // User | - -try { - api.testBodyWithQueryParams(query, user); -} catch on DioError (e) { - print('Exception when calling FakeApi->testBodyWithQueryParams: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **query** | **String**| | - **user** | [**User**](User.md)| | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **testClientModel** -> ModelClient testClientModel(modelClient) - -To test \"client\" model - -To test \"client\" model - -### Example -```dart -import 'package:openapi/api.dart'; - -final api = Openapi().getFakeApi(); -final ModelClient modelClient = ; // ModelClient | client model - -try { - final response = api.testClientModel(modelClient); - print(response); -} catch on DioError (e) { - print('Exception when calling FakeApi->testClientModel: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **modelClient** | [**ModelClient**](ModelClient.md)| client model | - -### Return type - -[**ModelClient**](ModelClient.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **testEndpointParameters** -> testEndpointParameters(number, double_, patternWithoutDelimiter, byte, integer, int32, int64, float, string, binary, date, dateTime, password, callback) - -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - -### Example -```dart -import 'package:openapi/api.dart'; -// TODO Configure HTTP basic authorization: http_basic_test -//defaultApiClient.getAuthentication('http_basic_test').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('http_basic_test').password = 'YOUR_PASSWORD'; - -final api = Openapi().getFakeApi(); -final num number = 8.14; // num | None -final double double_ = 1.2; // double | None -final String patternWithoutDelimiter = patternWithoutDelimiter_example; // String | None -final String byte = BYTE_ARRAY_DATA_HERE; // String | None -final int integer = 56; // int | None -final int int32 = 56; // int | None -final int int64 = 789; // int | None -final double float = 3.4; // double | None -final String string = string_example; // String | None -final Uint8List binary = BINARY_DATA_HERE; // Uint8List | None -final Date date = 2013-10-20; // Date | None -final DateTime dateTime = 2013-10-20T19:20:30+01:00; // DateTime | None -final String password = password_example; // String | None -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) { - print('Exception when calling FakeApi->testEndpointParameters: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **number** | **num**| None | - **double_** | **double**| None | - **patternWithoutDelimiter** | **String**| None | - **byte** | **String**| None | - **integer** | **int**| None | [optional] - **int32** | **int**| None | [optional] - **int64** | **int**| None | [optional] - **float** | **double**| None | [optional] - **string** | **String**| None | [optional] - **binary** | **Uint8List**| None | [optional] - **date** | **Date**| None | [optional] - **dateTime** | **DateTime**| None | [optional] - **password** | **String**| None | [optional] - **callback** | **String**| None | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[http_basic_test](../README.md#http_basic_test) - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **testEnumParameters** -> testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString) - -To test enum parameters - -To test enum parameters - -### Example -```dart -import 'package:openapi/api.dart'; - -final api = Openapi().getFakeApi(); -final BuiltList enumHeaderStringArray = ; // BuiltList | Header parameter enum test (string array) -final String enumHeaderString = enumHeaderString_example; // String | Header parameter enum test (string) -final BuiltList enumQueryStringArray = ; // BuiltList | Query parameter enum test (string array) -final String enumQueryString = enumQueryString_example; // String | Query parameter enum test (string) -final int enumQueryInteger = 56; // int | Query parameter enum test (double) -final double enumQueryDouble = 1.2; // double | Query parameter enum test (double) -final BuiltList enumFormStringArray = ; // BuiltList | Form parameter enum test (string array) -final String enumFormString = enumFormString_example; // String | Form parameter enum test (string) - -try { - api.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); -} catch on DioError (e) { - print('Exception when calling FakeApi->testEnumParameters: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **enumHeaderStringArray** | [**BuiltList<String>**](String.md)| Header parameter enum test (string array) | [optional] - **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to '-efg'] - **enumQueryStringArray** | [**BuiltList<String>**](String.md)| Query parameter enum test (string array) | [optional] - **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to '-efg'] - **enumQueryInteger** | **int**| Query parameter enum test (double) | [optional] - **enumQueryDouble** | **double**| Query parameter enum test (double) | [optional] - **enumFormStringArray** | [**BuiltList<String>**](String.md)| Form parameter enum test (string array) | [optional] [default to '$'] - **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to '-efg'] - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **testGroupParameters** -> testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group) - -Fake endpoint to test group parameters (optional) - -Fake endpoint to test group parameters (optional) - -### Example -```dart -import 'package:openapi/api.dart'; -// TODO Configure HTTP basic authorization: bearer_test -//defaultApiClient.getAuthentication('bearer_test').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearer_test').password = 'YOUR_PASSWORD'; - -final api = Openapi().getFakeApi(); -final int requiredStringGroup = 56; // int | Required String in group parameters -final bool requiredBooleanGroup = true; // bool | Required Boolean in group parameters -final int requiredInt64Group = 789; // int | Required Integer in group parameters -final int stringGroup = 56; // int | String in group parameters -final bool booleanGroup = true; // bool | Boolean in group parameters -final int int64Group = 789; // int | Integer in group parameters - -try { - api.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); -} catch on DioError (e) { - print('Exception when calling FakeApi->testGroupParameters: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **requiredStringGroup** | **int**| Required String in group parameters | - **requiredBooleanGroup** | **bool**| Required Boolean in group parameters | - **requiredInt64Group** | **int**| Required Integer in group parameters | - **stringGroup** | **int**| String in group parameters | [optional] - **booleanGroup** | **bool**| Boolean in group parameters | [optional] - **int64Group** | **int**| Integer in group parameters | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[bearer_test](../README.md#bearer_test) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **testInlineAdditionalProperties** -> testInlineAdditionalProperties(requestBody) - -test inline additionalProperties - -### Example -```dart -import 'package:openapi/api.dart'; - -final api = Openapi().getFakeApi(); -final BuiltMap requestBody = ; // BuiltMap | request body - -try { - api.testInlineAdditionalProperties(requestBody); -} catch on DioError (e) { - print('Exception when calling FakeApi->testInlineAdditionalProperties: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **requestBody** | [**BuiltMap<String, String>**](String.md)| request body | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **testJsonFormData** -> testJsonFormData(param, param2) - -test json serialization of form data - -### Example -```dart -import 'package:openapi/api.dart'; - -final api = Openapi().getFakeApi(); -final String param = param_example; // String | field1 -final String param2 = param2_example; // String | field2 - -try { - api.testJsonFormData(param, param2); -} catch on DioError (e) { - print('Exception when calling FakeApi->testJsonFormData: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | **String**| field1 | - **param2** | **String**| field2 | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **testQueryParameterCollectionFormat** -> testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language) - - - -To test the collection format in query parameters - -### Example -```dart -import 'package:openapi/api.dart'; - -final api = Openapi().getFakeApi(); -final BuiltList pipe = ; // BuiltList | -final BuiltList ioutil = ; // BuiltList | -final BuiltList http = ; // BuiltList | -final BuiltList url = ; // BuiltList | -final BuiltList context = ; // BuiltList | -final String allowEmpty = allowEmpty_example; // String | -final BuiltMap language = ; // BuiltMap | - -try { - api.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language); -} catch on DioError (e) { - print('Exception when calling FakeApi->testQueryParameterCollectionFormat: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pipe** | [**BuiltList<String>**](String.md)| | - **ioutil** | [**BuiltList<String>**](String.md)| | - **http** | [**BuiltList<String>**](String.md)| | - **url** | [**BuiltList<String>**](String.md)| | - **context** | [**BuiltList<String>**](String.md)| | - **allowEmpty** | **String**| | - **language** | [**BuiltMap<String, String>**](String.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/FakeClassnameTags123Api.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/FakeClassnameTags123Api.md deleted file mode 100644 index 35e244fbf21..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/FakeClassnameTags123Api.md +++ /dev/null @@ -1,61 +0,0 @@ -# openapi.api.FakeClassnameTags123Api - -## Load the API package -```dart -import 'package:openapi/api.dart'; -``` - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**testClassname**](FakeClassnameTags123Api.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case - - -# **testClassname** -> ModelClient testClassname(modelClient) - -To test class name in snake case - -To test class name in snake case - -### Example -```dart -import 'package:openapi/api.dart'; -// TODO Configure API key authorization: api_key_query -//defaultApiClient.getAuthentication('api_key_query').apiKey = 'YOUR_API_KEY'; -// uncomment below to setup prefix (e.g. Bearer) for API key, if needed -//defaultApiClient.getAuthentication('api_key_query').apiKeyPrefix = 'Bearer'; - -final api = Openapi().getFakeClassnameTags123Api(); -final ModelClient modelClient = ; // ModelClient | client model - -try { - final response = api.testClassname(modelClient); - print(response); -} catch on DioError (e) { - print('Exception when calling FakeClassnameTags123Api->testClassname: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **modelClient** | [**ModelClient**](ModelClient.md)| client model | - -### Return type - -[**ModelClient**](ModelClient.md) - -### Authorization - -[api_key_query](../README.md#api_key_query) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/FileSchemaTestClass.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/FileSchemaTestClass.md deleted file mode 100644 index 105fece87f1..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/FileSchemaTestClass.md +++ /dev/null @@ -1,16 +0,0 @@ -# openapi.model.FileSchemaTestClass - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**file** | [**ModelFile**](ModelFile.md) | | [optional] -**files** | [**BuiltList<ModelFile>**](ModelFile.md) | | [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-next/dio_http_petstore_client_lib_fake/doc/Foo.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Foo.md deleted file mode 100644 index 185b76e3f5b..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Foo.md +++ /dev/null @@ -1,15 +0,0 @@ -# openapi.model.Foo - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] [default to 'bar'] - -[[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-next/dio_http_petstore_client_lib_fake/doc/FormatTest.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/FormatTest.md deleted file mode 100644 index f811264ca2b..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/FormatTest.md +++ /dev/null @@ -1,30 +0,0 @@ -# openapi.model.FormatTest - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**integer** | **int** | | [optional] -**int32** | **int** | | [optional] -**int64** | **int** | | [optional] -**number** | **num** | | -**float** | **double** | | [optional] -**double_** | **double** | | [optional] -**decimal** | **double** | | [optional] -**string** | **String** | | [optional] -**byte** | **String** | | -**binary** | [**Uint8List**](Uint8List.md) | | [optional] -**date** | [**Date**](Date.md) | | -**dateTime** | [**DateTime**](DateTime.md) | | [optional] -**uuid** | **String** | | [optional] -**password** | **String** | | -**patternWithDigits** | **String** | A string that is a 10 digit number. Can have leading zeros. | [optional] -**patternWithDigitsAndDelimiter** | **String** | A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. | [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-next/dio_http_petstore_client_lib_fake/doc/HasOnlyReadOnly.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/HasOnlyReadOnly.md deleted file mode 100644 index 32cae937155..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/HasOnlyReadOnly.md +++ /dev/null @@ -1,16 +0,0 @@ -# openapi.model.HasOnlyReadOnly - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] -**foo** | **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-next/dio_http_petstore_client_lib_fake/doc/HealthCheckResult.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/HealthCheckResult.md deleted file mode 100644 index 4d6aeb75d96..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/HealthCheckResult.md +++ /dev/null @@ -1,15 +0,0 @@ -# openapi.model.HealthCheckResult - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**nullableMessage** | **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-next/dio_http_petstore_client_lib_fake/doc/InlineResponseDefault.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/InlineResponseDefault.md deleted file mode 100644 index c5e61e1162b..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/InlineResponseDefault.md +++ /dev/null @@ -1,15 +0,0 @@ -# openapi.model.InlineResponseDefault - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**string** | [**Foo**](Foo.md) | | [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-next/dio_http_petstore_client_lib_fake/doc/MapTest.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/MapTest.md deleted file mode 100644 index 4ad87df6423..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/MapTest.md +++ /dev/null @@ -1,18 +0,0 @@ -# openapi.model.MapTest - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mapMapOfString** | [**BuiltMap<String, BuiltMap<String, String>>**](BuiltMap.md) | | [optional] -**mapOfEnumString** | **BuiltMap<String, String>** | | [optional] -**directMap** | **BuiltMap<String, bool>** | | [optional] -**indirectMap** | **BuiltMap<String, 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-next/dio_http_petstore_client_lib_fake/doc/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/MixedPropertiesAndAdditionalPropertiesClass.md deleted file mode 100644 index b1a4c4ccc40..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/MixedPropertiesAndAdditionalPropertiesClass.md +++ /dev/null @@ -1,17 +0,0 @@ -# openapi.model.MixedPropertiesAndAdditionalPropertiesClass - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**uuid** | **String** | | [optional] -**dateTime** | [**DateTime**](DateTime.md) | | [optional] -**map** | [**BuiltMap<String, Animal>**](Animal.md) | | [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-next/dio_http_petstore_client_lib_fake/doc/Model200Response.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Model200Response.md deleted file mode 100644 index 5aa3fb97c32..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Model200Response.md +++ /dev/null @@ -1,16 +0,0 @@ -# openapi.model.Model200Response - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **int** | | [optional] -**class_** | **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-next/dio_http_petstore_client_lib_fake/doc/ModelClient.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ModelClient.md deleted file mode 100644 index f7b922f4a39..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ModelClient.md +++ /dev/null @@ -1,15 +0,0 @@ -# openapi.model.ModelClient - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**client** | **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-next/dio_http_petstore_client_lib_fake/doc/ModelEnumClass.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ModelEnumClass.md deleted file mode 100644 index ebaafb44c7f..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ModelEnumClass.md +++ /dev/null @@ -1,14 +0,0 @@ -# openapi.model.ModelEnumClass - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[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-next/dio_http_petstore_client_lib_fake/doc/ModelFile.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ModelFile.md deleted file mode 100644 index 4be260e93f6..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ModelFile.md +++ /dev/null @@ -1,15 +0,0 @@ -# openapi.model.ModelFile - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**sourceURI** | **String** | Test capitalization | [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-next/dio_http_petstore_client_lib_fake/doc/ModelList.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ModelList.md deleted file mode 100644 index 283aa1f6b71..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ModelList.md +++ /dev/null @@ -1,15 +0,0 @@ -# openapi.model.ModelList - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**n123list** | **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-next/dio_http_petstore_client_lib_fake/doc/ModelReturn.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ModelReturn.md deleted file mode 100644 index bc02df7a369..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ModelReturn.md +++ /dev/null @@ -1,15 +0,0 @@ -# openapi.model.ModelReturn - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**return_** | **int** | | [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-next/dio_http_petstore_client_lib_fake/doc/Name.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Name.md deleted file mode 100644 index 25f49ea946b..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Name.md +++ /dev/null @@ -1,18 +0,0 @@ -# openapi.model.Name - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **int** | | -**snakeCase** | **int** | | [optional] -**property** | **String** | | [optional] -**n123number** | **int** | | [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-next/dio_http_petstore_client_lib_fake/doc/NullableClass.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/NullableClass.md deleted file mode 100644 index 4ce8d5e1757..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/NullableClass.md +++ /dev/null @@ -1,26 +0,0 @@ -# openapi.model.NullableClass - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**integerProp** | **int** | | [optional] -**numberProp** | **num** | | [optional] -**booleanProp** | **bool** | | [optional] -**stringProp** | **String** | | [optional] -**dateProp** | [**Date**](Date.md) | | [optional] -**datetimeProp** | [**DateTime**](DateTime.md) | | [optional] -**arrayNullableProp** | [**BuiltList<JsonObject>**](JsonObject.md) | | [optional] -**arrayAndItemsNullableProp** | [**BuiltList<JsonObject>**](JsonObject.md) | | [optional] -**arrayItemsNullable** | [**BuiltList<JsonObject>**](JsonObject.md) | | [optional] -**objectNullableProp** | [**BuiltMap<String, JsonObject>**](JsonObject.md) | | [optional] -**objectAndItemsNullableProp** | [**BuiltMap<String, JsonObject>**](JsonObject.md) | | [optional] -**objectItemsNullable** | [**BuiltMap<String, JsonObject>**](JsonObject.md) | | [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-next/dio_http_petstore_client_lib_fake/doc/NumberOnly.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/NumberOnly.md deleted file mode 100644 index d8096a3db37..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/NumberOnly.md +++ /dev/null @@ -1,15 +0,0 @@ -# openapi.model.NumberOnly - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**justNumber** | **num** | | [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-next/dio_http_petstore_client_lib_fake/doc/ObjectWithDeprecatedFields.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ObjectWithDeprecatedFields.md deleted file mode 100644 index 3e7848d382c..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ObjectWithDeprecatedFields.md +++ /dev/null @@ -1,18 +0,0 @@ -# openapi.model.ObjectWithDeprecatedFields - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**uuid** | **String** | | [optional] -**id** | **num** | | [optional] -**deprecatedRef** | [**DeprecatedObject**](DeprecatedObject.md) | | [optional] -**bars** | **BuiltList<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-next/dio_http_petstore_client_lib_fake/doc/Order.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Order.md deleted file mode 100644 index bde5ffe51a2..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Order.md +++ /dev/null @@ -1,20 +0,0 @@ -# openapi.model.Order - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | [optional] -**petId** | **int** | | [optional] -**quantity** | **int** | | [optional] -**shipDate** | [**DateTime**](DateTime.md) | | [optional] -**status** | **String** | Order Status | [optional] -**complete** | **bool** | | [optional] [default to false] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/OuterComposite.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/OuterComposite.md deleted file mode 100644 index 04bab7eff5d..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/OuterComposite.md +++ /dev/null @@ -1,17 +0,0 @@ -# openapi.model.OuterComposite - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**myNumber** | **num** | | [optional] -**myString** | **String** | | [optional] -**myBoolean** | **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-next/dio_http_petstore_client_lib_fake/doc/OuterEnum.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/OuterEnum.md deleted file mode 100644 index af62ad87ab2..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/OuterEnum.md +++ /dev/null @@ -1,14 +0,0 @@ -# openapi.model.OuterEnum - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[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-next/dio_http_petstore_client_lib_fake/doc/OuterEnumDefaultValue.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/OuterEnumDefaultValue.md deleted file mode 100644 index c1bf8b0dec4..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/OuterEnumDefaultValue.md +++ /dev/null @@ -1,14 +0,0 @@ -# openapi.model.OuterEnumDefaultValue - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[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-next/dio_http_petstore_client_lib_fake/doc/OuterEnumInteger.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/OuterEnumInteger.md deleted file mode 100644 index 8c80a9e5c85..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/OuterEnumInteger.md +++ /dev/null @@ -1,14 +0,0 @@ -# openapi.model.OuterEnumInteger - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[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-next/dio_http_petstore_client_lib_fake/doc/OuterEnumIntegerDefaultValue.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/OuterEnumIntegerDefaultValue.md deleted file mode 100644 index eb8b55d7024..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/OuterEnumIntegerDefaultValue.md +++ /dev/null @@ -1,14 +0,0 @@ -# openapi.model.OuterEnumIntegerDefaultValue - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[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-next/dio_http_petstore_client_lib_fake/doc/OuterObjectWithEnumProperty.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/OuterObjectWithEnumProperty.md deleted file mode 100644 index eab2ae8f66b..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/OuterObjectWithEnumProperty.md +++ /dev/null @@ -1,15 +0,0 @@ -# openapi.model.OuterObjectWithEnumProperty - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**value** | [**OuterEnumInteger**](OuterEnumInteger.md) | | - -[[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-next/dio_http_petstore_client_lib_fake/doc/Pet.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Pet.md deleted file mode 100644 index 08e0aeedd78..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Pet.md +++ /dev/null @@ -1,20 +0,0 @@ -# openapi.model.Pet - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | [optional] -**category** | [**Category**](Category.md) | | [optional] -**name** | **String** | | -**photoUrls** | **BuiltSet<String>** | | -**tags** | [**BuiltList<Tag>**](Tag.md) | | [optional] -**status** | **String** | pet status in the store | [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-next/dio_http_petstore_client_lib_fake/doc/PetApi.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/PetApi.md deleted file mode 100644 index 6afc643ea56..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/PetApi.md +++ /dev/null @@ -1,427 +0,0 @@ -# openapi.api.PetApi - -## Load the API package -```dart -import 'package:openapi/api.dart'; -``` - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**addPet**](PetApi.md#addpet) | **POST** /pet | Add a new pet to the store -[**deletePet**](PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet -[**findPetsByStatus**](PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status -[**findPetsByTags**](PetApi.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags -[**getPetById**](PetApi.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID -[**updatePet**](PetApi.md#updatepet) | **PUT** /pet | Update an existing pet -[**updatePetWithForm**](PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data -[**uploadFile**](PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image -[**uploadFileWithRequiredFile**](PetApi.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) - - -# **addPet** -> addPet(pet) - -Add a new pet to the store - -### Example -```dart -import 'package:openapi/api.dart'; -// TODO Configure OAuth2 access token for authorization: petstore_auth -//defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; - -final api = Openapi().getPetApi(); -final Pet pet = ; // Pet | Pet object that needs to be added to the store - -try { - api.addPet(pet); -} catch on DioError (e) { - print('Exception when calling PetApi->addPet: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | - -### Return type - -void (empty response body) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - - - **Content-Type**: application/json, application/xml - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **deletePet** -> deletePet(petId, apiKey) - -Deletes a pet - -### Example -```dart -import 'package:openapi/api.dart'; -// TODO Configure OAuth2 access token for authorization: petstore_auth -//defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; - -final api = Openapi().getPetApi(); -final int petId = 789; // int | Pet id to delete -final String apiKey = apiKey_example; // String | - -try { - api.deletePet(petId, apiKey); -} catch on DioError (e) { - print('Exception when calling PetApi->deletePet: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **int**| Pet id to delete | - **apiKey** | **String**| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **findPetsByStatus** -> BuiltList findPetsByStatus(status) - -Finds Pets by status - -Multiple status values can be provided with comma separated strings - -### Example -```dart -import 'package:openapi/api.dart'; -// TODO Configure OAuth2 access token for authorization: petstore_auth -//defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; - -final api = Openapi().getPetApi(); -final BuiltList status = ; // BuiltList | Status values that need to be considered for filter - -try { - final response = api.findPetsByStatus(status); - print(response); -} catch on DioError (e) { - print('Exception when calling PetApi->findPetsByStatus: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **status** | [**BuiltList<String>**](String.md)| Status values that need to be considered for filter | - -### Return type - -[**BuiltList<Pet>**](Pet.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/xml, application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **findPetsByTags** -> BuiltSet findPetsByTags(tags) - -Finds Pets by tags - -Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - -### Example -```dart -import 'package:openapi/api.dart'; -// TODO Configure OAuth2 access token for authorization: petstore_auth -//defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; - -final api = Openapi().getPetApi(); -final BuiltSet tags = ; // BuiltSet | Tags to filter by - -try { - final response = api.findPetsByTags(tags); - print(response); -} catch on DioError (e) { - print('Exception when calling PetApi->findPetsByTags: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **tags** | [**BuiltSet<String>**](String.md)| Tags to filter by | - -### Return type - -[**BuiltSet<Pet>**](Pet.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/xml, application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **getPetById** -> Pet getPetById(petId) - -Find pet by ID - -Returns a single pet - -### Example -```dart -import 'package:openapi/api.dart'; -// TODO Configure API key authorization: api_key -//defaultApiClient.getAuthentication('api_key').apiKey = 'YOUR_API_KEY'; -// uncomment below to setup prefix (e.g. Bearer) for API key, if needed -//defaultApiClient.getAuthentication('api_key').apiKeyPrefix = 'Bearer'; - -final api = Openapi().getPetApi(); -final int petId = 789; // int | ID of pet to return - -try { - final response = api.getPetById(petId); - print(response); -} catch on DioError (e) { - print('Exception when calling PetApi->getPetById: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **int**| ID of pet to return | - -### Return type - -[**Pet**](Pet.md) - -### Authorization - -[api_key](../README.md#api_key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/xml, application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **updatePet** -> updatePet(pet) - -Update an existing pet - -### Example -```dart -import 'package:openapi/api.dart'; -// TODO Configure OAuth2 access token for authorization: petstore_auth -//defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; - -final api = Openapi().getPetApi(); -final Pet pet = ; // Pet | Pet object that needs to be added to the store - -try { - api.updatePet(pet); -} catch on DioError (e) { - print('Exception when calling PetApi->updatePet: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | - -### Return type - -void (empty response body) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - - - **Content-Type**: application/json, application/xml - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **updatePetWithForm** -> updatePetWithForm(petId, name, status) - -Updates a pet in the store with form data - -### Example -```dart -import 'package:openapi/api.dart'; -// TODO Configure OAuth2 access token for authorization: petstore_auth -//defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; - -final api = Openapi().getPetApi(); -final int petId = 789; // int | ID of pet that needs to be updated -final String name = name_example; // String | Updated name of the pet -final String status = status_example; // String | Updated status of the pet - -try { - api.updatePetWithForm(petId, name, status); -} catch on DioError (e) { - print('Exception when calling PetApi->updatePetWithForm: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **int**| ID of pet that needs to be updated | - **name** | **String**| Updated name of the pet | [optional] - **status** | **String**| Updated status of the pet | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **uploadFile** -> ApiResponse uploadFile(petId, additionalMetadata, file) - -uploads an image - -### Example -```dart -import 'package:openapi/api.dart'; -// TODO Configure OAuth2 access token for authorization: petstore_auth -//defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; - -final api = Openapi().getPetApi(); -final int petId = 789; // int | ID of pet to update -final String additionalMetadata = additionalMetadata_example; // String | Additional data to pass to server -final MultipartFile file = BINARY_DATA_HERE; // MultipartFile | file to upload - -try { - final response = api.uploadFile(petId, additionalMetadata, file); - print(response); -} catch on DioError (e) { - print('Exception when calling PetApi->uploadFile: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **int**| ID of pet to update | - **additionalMetadata** | **String**| Additional data to pass to server | [optional] - **file** | **MultipartFile**| file to upload | [optional] - -### Return type - -[**ApiResponse**](ApiResponse.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - - - **Content-Type**: multipart/form-data - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **uploadFileWithRequiredFile** -> ApiResponse uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata) - -uploads an image (required) - -### Example -```dart -import 'package:openapi/api.dart'; -// TODO Configure OAuth2 access token for authorization: petstore_auth -//defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; - -final api = Openapi().getPetApi(); -final int petId = 789; // int | ID of pet to update -final MultipartFile requiredFile = BINARY_DATA_HERE; // MultipartFile | file to upload -final String additionalMetadata = additionalMetadata_example; // String | Additional data to pass to server - -try { - final response = api.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); - print(response); -} catch on DioError (e) { - print('Exception when calling PetApi->uploadFileWithRequiredFile: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **int**| ID of pet to update | - **requiredFile** | **MultipartFile**| file to upload | - **additionalMetadata** | **String**| Additional data to pass to server | [optional] - -### Return type - -[**ApiResponse**](ApiResponse.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - - - **Content-Type**: multipart/form-data - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ReadOnlyFirst.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ReadOnlyFirst.md deleted file mode 100644 index 8f612e8ba19..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ReadOnlyFirst.md +++ /dev/null @@ -1,16 +0,0 @@ -# openapi.model.ReadOnlyFirst - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] -**baz** | **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-next/dio_http_petstore_client_lib_fake/doc/SpecialModelName.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/SpecialModelName.md deleted file mode 100644 index 5fcfa98e0b3..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/SpecialModelName.md +++ /dev/null @@ -1,15 +0,0 @@ -# openapi.model.SpecialModelName - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket** | **int** | | [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-next/dio_http_petstore_client_lib_fake/doc/StoreApi.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/StoreApi.md deleted file mode 100644 index 5c8a683579e..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/StoreApi.md +++ /dev/null @@ -1,186 +0,0 @@ -# openapi.api.StoreApi - -## Load the API package -```dart -import 'package:openapi/api.dart'; -``` - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**deleteOrder**](StoreApi.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID -[**getInventory**](StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status -[**getOrderById**](StoreApi.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID -[**placeOrder**](StoreApi.md#placeorder) | **POST** /store/order | Place an order for a pet - - -# **deleteOrder** -> deleteOrder(orderId) - -Delete purchase order by ID - -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - -### Example -```dart -import 'package:openapi/api.dart'; - -final api = Openapi().getStoreApi(); -final String orderId = orderId_example; // String | ID of the order that needs to be deleted - -try { - api.deleteOrder(orderId); -} catch on DioError (e) { - print('Exception when calling StoreApi->deleteOrder: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **String**| ID of the order that needs to be deleted | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **getInventory** -> BuiltMap getInventory() - -Returns pet inventories by status - -Returns a map of status codes to quantities - -### Example -```dart -import 'package:openapi/api.dart'; -// TODO Configure API key authorization: api_key -//defaultApiClient.getAuthentication('api_key').apiKey = 'YOUR_API_KEY'; -// uncomment below to setup prefix (e.g. Bearer) for API key, if needed -//defaultApiClient.getAuthentication('api_key').apiKeyPrefix = 'Bearer'; - -final api = Openapi().getStoreApi(); - -try { - final response = api.getInventory(); - print(response); -} catch on DioError (e) { - print('Exception when calling StoreApi->getInventory: $e\n'); -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -**BuiltMap<String, int>** - -### Authorization - -[api_key](../README.md#api_key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **getOrderById** -> Order getOrderById(orderId) - -Find purchase order by ID - -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - -### Example -```dart -import 'package:openapi/api.dart'; - -final api = Openapi().getStoreApi(); -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) { - print('Exception when calling StoreApi->getOrderById: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **int**| ID of pet that needs to be fetched | - -### Return type - -[**Order**](Order.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/xml, application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **placeOrder** -> Order placeOrder(order) - -Place an order for a pet - -### Example -```dart -import 'package:openapi/api.dart'; - -final api = Openapi().getStoreApi(); -final Order order = ; // Order | order placed for purchasing the pet - -try { - final response = api.placeOrder(order); - print(response); -} catch on DioError (e) { - print('Exception when calling StoreApi->placeOrder: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **order** | [**Order**](Order.md)| order placed for purchasing the pet | - -### Return type - -[**Order**](Order.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/xml, application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Tag.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Tag.md deleted file mode 100644 index c219f987c19..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Tag.md +++ /dev/null @@ -1,16 +0,0 @@ -# openapi.model.Tag - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | [optional] -**name** | **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-next/dio_http_petstore_client_lib_fake/doc/User.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/User.md deleted file mode 100644 index fa87e64d859..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/User.md +++ /dev/null @@ -1,22 +0,0 @@ -# openapi.model.User - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | [optional] -**username** | **String** | | [optional] -**firstName** | **String** | | [optional] -**lastName** | **String** | | [optional] -**email** | **String** | | [optional] -**password** | **String** | | [optional] -**phone** | **String** | | [optional] -**userStatus** | **int** | User Status | [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-next/dio_http_petstore_client_lib_fake/doc/UserApi.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/UserApi.md deleted file mode 100644 index e3af05ffb08..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/UserApi.md +++ /dev/null @@ -1,349 +0,0 @@ -# openapi.api.UserApi - -## Load the API package -```dart -import 'package:openapi/api.dart'; -``` - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**createUser**](UserApi.md#createuser) | **POST** /user | Create user -[**createUsersWithArrayInput**](UserApi.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array -[**createUsersWithListInput**](UserApi.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array -[**deleteUser**](UserApi.md#deleteuser) | **DELETE** /user/{username} | Delete user -[**getUserByName**](UserApi.md#getuserbyname) | **GET** /user/{username} | Get user by user name -[**loginUser**](UserApi.md#loginuser) | **GET** /user/login | Logs user into the system -[**logoutUser**](UserApi.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session -[**updateUser**](UserApi.md#updateuser) | **PUT** /user/{username} | Updated user - - -# **createUser** -> createUser(user) - -Create user - -This can only be done by the logged in user. - -### Example -```dart -import 'package:openapi/api.dart'; - -final api = Openapi().getUserApi(); -final User user = ; // User | Created user object - -try { - api.createUser(user); -} catch on DioError (e) { - print('Exception when calling UserApi->createUser: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **user** | [**User**](User.md)| Created user object | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **createUsersWithArrayInput** -> createUsersWithArrayInput(user) - -Creates list of users with given input array - -### Example -```dart -import 'package:openapi/api.dart'; - -final api = Openapi().getUserApi(); -final BuiltList user = ; // BuiltList | List of user object - -try { - api.createUsersWithArrayInput(user); -} catch on DioError (e) { - print('Exception when calling UserApi->createUsersWithArrayInput: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **user** | [**BuiltList<User>**](User.md)| List of user object | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **createUsersWithListInput** -> createUsersWithListInput(user) - -Creates list of users with given input array - -### Example -```dart -import 'package:openapi/api.dart'; - -final api = Openapi().getUserApi(); -final BuiltList user = ; // BuiltList | List of user object - -try { - api.createUsersWithListInput(user); -} catch on DioError (e) { - print('Exception when calling UserApi->createUsersWithListInput: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **user** | [**BuiltList<User>**](User.md)| List of user object | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **deleteUser** -> deleteUser(username) - -Delete user - -This can only be done by the logged in user. - -### Example -```dart -import 'package:openapi/api.dart'; - -final api = Openapi().getUserApi(); -final String username = username_example; // String | The name that needs to be deleted - -try { - api.deleteUser(username); -} catch on DioError (e) { - print('Exception when calling UserApi->deleteUser: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The name that needs to be deleted | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **getUserByName** -> User getUserByName(username) - -Get user by user name - -### Example -```dart -import 'package:openapi/api.dart'; - -final api = Openapi().getUserApi(); -final String username = username_example; // String | The name that needs to be fetched. Use user1 for testing. - -try { - final response = api.getUserByName(username); - print(response); -} catch on DioError (e) { - print('Exception when calling UserApi->getUserByName: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The name that needs to be fetched. Use user1 for testing. | - -### Return type - -[**User**](User.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/xml, application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **loginUser** -> String loginUser(username, password) - -Logs user into the system - -### Example -```dart -import 'package:openapi/api.dart'; - -final api = Openapi().getUserApi(); -final String username = username_example; // String | The user name for login -final String password = password_example; // String | The password for login in clear text - -try { - final response = api.loginUser(username, password); - print(response); -} catch on DioError (e) { - print('Exception when calling UserApi->loginUser: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The user name for login | - **password** | **String**| The password for login in clear text | - -### Return type - -**String** - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/xml, application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **logoutUser** -> logoutUser() - -Logs out current logged in user session - -### Example -```dart -import 'package:openapi/api.dart'; - -final api = Openapi().getUserApi(); - -try { - api.logoutUser(); -} catch on DioError (e) { - print('Exception when calling UserApi->logoutUser: $e\n'); -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **updateUser** -> updateUser(username, user) - -Updated user - -This can only be done by the logged in user. - -### Example -```dart -import 'package:openapi/api.dart'; - -final api = Openapi().getUserApi(); -final String username = username_example; // String | name that need to be deleted -final User user = ; // User | Updated user object - -try { - api.updateUser(username, user); -} catch on DioError (e) { - print('Exception when calling UserApi->updateUser: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| name that need to be deleted | - **user** | [**User**](User.md)| Updated user object | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/openapi.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/openapi.dart deleted file mode 100644 index 5dbf2a6964d..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/openapi.dart +++ /dev/null @@ -1,65 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -export 'package:openapi/src/api.dart'; -export 'package:openapi/src/auth/api_key_auth.dart'; -export 'package:openapi/src/auth/basic_auth.dart'; -export 'package:openapi/src/auth/oauth.dart'; -export 'package:openapi/src/serializers.dart'; -export 'package:openapi/src/model/date.dart'; - -export 'package:openapi/src/api/another_fake_api.dart'; -export 'package:openapi/src/api/default_api.dart'; -export 'package:openapi/src/api/fake_api.dart'; -export 'package:openapi/src/api/fake_classname_tags123_api.dart'; -export 'package:openapi/src/api/pet_api.dart'; -export 'package:openapi/src/api/store_api.dart'; -export 'package:openapi/src/api/user_api.dart'; - -export 'package:openapi/src/model/additional_properties_class.dart'; -export 'package:openapi/src/model/animal.dart'; -export 'package:openapi/src/model/api_response.dart'; -export 'package:openapi/src/model/array_of_array_of_number_only.dart'; -export 'package:openapi/src/model/array_of_number_only.dart'; -export 'package:openapi/src/model/array_test.dart'; -export 'package:openapi/src/model/capitalization.dart'; -export 'package:openapi/src/model/cat.dart'; -export 'package:openapi/src/model/cat_all_of.dart'; -export 'package:openapi/src/model/category.dart'; -export 'package:openapi/src/model/class_model.dart'; -export 'package:openapi/src/model/deprecated_object.dart'; -export 'package:openapi/src/model/dog.dart'; -export 'package:openapi/src/model/dog_all_of.dart'; -export 'package:openapi/src/model/enum_arrays.dart'; -export 'package:openapi/src/model/enum_test.dart'; -export 'package:openapi/src/model/file_schema_test_class.dart'; -export 'package:openapi/src/model/foo.dart'; -export 'package:openapi/src/model/format_test.dart'; -export 'package:openapi/src/model/has_only_read_only.dart'; -export 'package:openapi/src/model/health_check_result.dart'; -export 'package:openapi/src/model/inline_response_default.dart'; -export 'package:openapi/src/model/map_test.dart'; -export 'package:openapi/src/model/mixed_properties_and_additional_properties_class.dart'; -export 'package:openapi/src/model/model200_response.dart'; -export 'package:openapi/src/model/model_client.dart'; -export 'package:openapi/src/model/model_enum_class.dart'; -export 'package:openapi/src/model/model_file.dart'; -export 'package:openapi/src/model/model_list.dart'; -export 'package:openapi/src/model/model_return.dart'; -export 'package:openapi/src/model/name.dart'; -export 'package:openapi/src/model/nullable_class.dart'; -export 'package:openapi/src/model/number_only.dart'; -export 'package:openapi/src/model/object_with_deprecated_fields.dart'; -export 'package:openapi/src/model/order.dart'; -export 'package:openapi/src/model/outer_composite.dart'; -export 'package:openapi/src/model/outer_enum.dart'; -export 'package:openapi/src/model/outer_enum_default_value.dart'; -export 'package:openapi/src/model/outer_enum_integer.dart'; -export 'package:openapi/src/model/outer_enum_integer_default_value.dart'; -export 'package:openapi/src/model/outer_object_with_enum_property.dart'; -export 'package:openapi/src/model/pet.dart'; -export 'package:openapi/src/model/read_only_first.dart'; -export 'package:openapi/src/model/special_model_name.dart'; -export 'package:openapi/src/model/tag.dart'; -export 'package:openapi/src/model/user.dart'; diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/api.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/api.dart deleted file mode 100644 index d2d54f38185..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/api.dart +++ /dev/null @@ -1,115 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -import 'package:dio_http/dio_http.dart'; -import 'package:built_value/serializer.dart'; -import 'package:openapi/src/serializers.dart'; -import 'package:openapi/src/auth/api_key_auth.dart'; -import 'package:openapi/src/auth/basic_auth.dart'; -import 'package:openapi/src/auth/bearer_auth.dart'; -import 'package:openapi/src/auth/oauth.dart'; -import 'package:openapi/src/api/another_fake_api.dart'; -import 'package:openapi/src/api/default_api.dart'; -import 'package:openapi/src/api/fake_api.dart'; -import 'package:openapi/src/api/fake_classname_tags123_api.dart'; -import 'package:openapi/src/api/pet_api.dart'; -import 'package:openapi/src/api/store_api.dart'; -import 'package:openapi/src/api/user_api.dart'; - -class Openapi { - static const String basePath = r'http://petstore.swagger.io:80/v2'; - - final Dio dio; - final Serializers serializers; - - Openapi({ - Dio? dio, - Serializers? serializers, - String? basePathOverride, - List? interceptors, - }) : this.serializers = serializers ?? standardSerializers, - this.dio = dio ?? - Dio(BaseOptions( - baseUrl: basePathOverride ?? basePath, - connectTimeout: 5000, - receiveTimeout: 3000, - )) { - if (interceptors == null) { - this.dio.interceptors.addAll([ - OAuthInterceptor(), - BasicAuthInterceptor(), - BearerAuthInterceptor(), - ApiKeyAuthInterceptor(), - ]); - } else { - this.dio.interceptors.addAll(interceptors); - } - } - - void setOAuthToken(String name, String token) { - if (this.dio.interceptors.any((i) => i is OAuthInterceptor)) { - (this.dio.interceptors.firstWhere((i) => i is OAuthInterceptor) as OAuthInterceptor).tokens[name] = token; - } - } - - void setBearerAuth(String name, String token) { - if (this.dio.interceptors.any((i) => i is BearerAuthInterceptor)) { - (this.dio.interceptors.firstWhere((i) => i is BearerAuthInterceptor) as BearerAuthInterceptor).tokens[name] = token; - } - } - - void setBasicAuth(String name, String username, String password) { - if (this.dio.interceptors.any((i) => i is BasicAuthInterceptor)) { - (this.dio.interceptors.firstWhere((i) => i is BasicAuthInterceptor) as BasicAuthInterceptor).authInfo[name] = BasicAuthInfo(username, password); - } - } - - void setApiKey(String name, String apiKey) { - if (this.dio.interceptors.any((i) => i is ApiKeyAuthInterceptor)) { - (this.dio.interceptors.firstWhere((element) => element is ApiKeyAuthInterceptor) as ApiKeyAuthInterceptor).apiKeys[name] = apiKey; - } - } - - /// Get AnotherFakeApi instance, base route and serializer can be overridden by a given but be careful, - /// by doing that all interceptors will not be executed - AnotherFakeApi getAnotherFakeApi() { - return AnotherFakeApi(dio, serializers); - } - - /// Get DefaultApi instance, base route and serializer can be overridden by a given but be careful, - /// by doing that all interceptors will not be executed - DefaultApi getDefaultApi() { - return DefaultApi(dio, serializers); - } - - /// Get FakeApi instance, base route and serializer can be overridden by a given but be careful, - /// by doing that all interceptors will not be executed - FakeApi getFakeApi() { - return FakeApi(dio, serializers); - } - - /// Get FakeClassnameTags123Api instance, base route and serializer can be overridden by a given but be careful, - /// by doing that all interceptors will not be executed - FakeClassnameTags123Api getFakeClassnameTags123Api() { - return FakeClassnameTags123Api(dio, serializers); - } - - /// Get PetApi instance, base route and serializer can be overridden by a given but be careful, - /// by doing that all interceptors will not be executed - PetApi getPetApi() { - return PetApi(dio, serializers); - } - - /// Get StoreApi instance, base route and serializer can be overridden by a given but be careful, - /// by doing that all interceptors will not be executed - StoreApi getStoreApi() { - return StoreApi(dio, serializers); - } - - /// Get UserApi instance, base route and serializer can be overridden by a given but be careful, - /// by doing that all interceptors will not be executed - UserApi getUserApi() { - return UserApi(dio, serializers); - } -} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/api/another_fake_api.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/api/another_fake_api.dart deleted file mode 100644 index d361f9ce96d..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/api/another_fake_api.dart +++ /dev/null @@ -1,113 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -import 'dart:async'; - -import 'package:built_value/serializer.dart'; -import 'package:dio_http/dio_http.dart'; - -import 'package:openapi/src/model/model_client.dart'; - -class AnotherFakeApi { - - final Dio _dio; - - final Serializers _serializers; - - const AnotherFakeApi(this._dio, this._serializers); - - /// To test special tags - /// To test special tags and operation ID starting with number - /// - /// Parameters: - /// * [modelClient] - client model - /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation - /// * [headers] - Can be used to add additional headers to the request - /// * [extras] - Can be used to add flags to the request - /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response - /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress - /// * [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 - Future> call123testSpecialTags({ - required ModelClient modelClient, - CancelToken? cancelToken, - Map? headers, - Map? extra, - ValidateStatus? validateStatus, - ProgressCallback? onSendProgress, - ProgressCallback? onReceiveProgress, - }) async { - final _path = r'/another-fake/dummy'; - final _options = Options( - method: r'PATCH', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - contentType: 'application/json', - validateStatus: validateStatus, - ); - - dynamic _bodyData; - - try { - const _type = FullType(ModelClient); - _bodyData = _serializers.serialize(modelClient, specifiedType: _type); - - } catch(error, stackTrace) { - throw DioError( - requestOptions: _options.compose( - _dio.options, - _path, - ), - type: DioErrorType.other, - error: error, - )..stackTrace = stackTrace; - } - - final _response = await _dio.request( - _path, - data: _bodyData, - options: _options, - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - ModelClient _responseData; - - try { - const _responseType = FullType(ModelClient); - _responseData = _serializers.deserialize( - _response.data!, - specifiedType: _responseType, - ) as ModelClient; - - } catch (error, stackTrace) { - throw DioError( - requestOptions: _response.requestOptions, - response: _response, - type: DioErrorType.other, - error: error, - )..stackTrace = stackTrace; - } - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - requestOptions: _response.requestOptions, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - -} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/api/default_api.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/api/default_api.dart deleted file mode 100644 index 87c6f0dd2fc..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/api/default_api.dart +++ /dev/null @@ -1,92 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -import 'dart:async'; - -import 'package:built_value/serializer.dart'; -import 'package:dio_http/dio_http.dart'; - -import 'package:openapi/src/model/inline_response_default.dart'; - -class DefaultApi { - - final Dio _dio; - - final Serializers _serializers; - - const DefaultApi(this._dio, this._serializers); - - /// fooGet - /// - /// - /// Parameters: - /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation - /// * [headers] - Can be used to add additional headers to the request - /// * [extras] - Can be used to add flags to the request - /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response - /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress - /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress - /// - /// Returns a [Future] containing a [Response] with a [InlineResponseDefault] as data - /// Throws [DioError] if API call or serialization fails - Future> fooGet({ - CancelToken? cancelToken, - Map? headers, - Map? extra, - ValidateStatus? validateStatus, - ProgressCallback? onSendProgress, - ProgressCallback? onReceiveProgress, - }) async { - final _path = r'/foo'; - final _options = Options( - method: r'GET', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - ); - - final _response = await _dio.request( - _path, - options: _options, - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - InlineResponseDefault _responseData; - - try { - const _responseType = FullType(InlineResponseDefault); - _responseData = _serializers.deserialize( - _response.data!, - specifiedType: _responseType, - ) as InlineResponseDefault; - - } catch (error, stackTrace) { - throw DioError( - requestOptions: _response.requestOptions, - response: _response, - type: DioErrorType.other, - error: error, - )..stackTrace = stackTrace; - } - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - requestOptions: _response.requestOptions, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - -} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/api/fake_api.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/api/fake_api.dart deleted file mode 100644 index d8640836000..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/api/fake_api.dart +++ /dev/null @@ -1,1417 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -import 'dart:async'; - -import 'package:built_value/serializer.dart'; -import 'package:dio_http/dio_http.dart'; - -import 'dart:typed_data'; -import 'package:built_collection/built_collection.dart'; -import 'package:openapi/src/api_util.dart'; -import 'package:openapi/src/model/date.dart'; -import 'package:openapi/src/model/file_schema_test_class.dart'; -import 'package:openapi/src/model/health_check_result.dart'; -import 'package:openapi/src/model/model_client.dart'; -import 'package:openapi/src/model/outer_composite.dart'; -import 'package:openapi/src/model/outer_object_with_enum_property.dart'; -import 'package:openapi/src/model/pet.dart'; -import 'package:openapi/src/model/user.dart'; - -class FakeApi { - - final Dio _dio; - - final Serializers _serializers; - - const FakeApi(this._dio, this._serializers); - - /// Health check endpoint - /// - /// - /// Parameters: - /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation - /// * [headers] - Can be used to add additional headers to the request - /// * [extras] - Can be used to add flags to the request - /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response - /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress - /// * [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 - Future> fakeHealthGet({ - CancelToken? cancelToken, - Map? headers, - Map? extra, - ValidateStatus? validateStatus, - ProgressCallback? onSendProgress, - ProgressCallback? onReceiveProgress, - }) async { - final _path = r'/fake/health'; - final _options = Options( - method: r'GET', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - ); - - final _response = await _dio.request( - _path, - options: _options, - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - HealthCheckResult _responseData; - - try { - const _responseType = FullType(HealthCheckResult); - _responseData = _serializers.deserialize( - _response.data!, - specifiedType: _responseType, - ) as HealthCheckResult; - - } catch (error, stackTrace) { - throw DioError( - requestOptions: _response.requestOptions, - response: _response, - type: DioErrorType.other, - error: error, - )..stackTrace = stackTrace; - } - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - requestOptions: _response.requestOptions, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// test http signature authentication - /// - /// - /// Parameters: - /// * [pet] - Pet object that needs to be added to the store - /// * [query1] - query parameter - /// * [header1] - header parameter - /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation - /// * [headers] - Can be used to add additional headers to the request - /// * [extras] - Can be used to add flags to the request - /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response - /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress - /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress - /// - /// Returns a [Future] - /// Throws [DioError] if API call or serialization fails - Future> fakeHttpSignatureTest({ - required Pet pet, - String? query1, - String? header1, - CancelToken? cancelToken, - Map? headers, - Map? extra, - ValidateStatus? validateStatus, - ProgressCallback? onSendProgress, - ProgressCallback? onReceiveProgress, - }) async { - final _path = r'/fake/http-signature-test'; - final _options = Options( - method: r'GET', - headers: { - if (header1 != null) r'header_1': header1, - ...?headers, - }, - extra: { - 'secure': >[ - { - 'type': 'http', - 'scheme': 'signature', - 'name': 'http_signature_test', - }, - ], - ...?extra, - }, - contentType: 'application/json', - validateStatus: validateStatus, - ); - - final _queryParameters = { - if (query1 != null) r'query_1': encodeQueryParameter(_serializers, query1, const FullType(String)), - }; - - dynamic _bodyData; - - try { - const _type = FullType(Pet); - _bodyData = _serializers.serialize(pet, specifiedType: _type); - - } catch(error, stackTrace) { - throw DioError( - requestOptions: _options.compose( - _dio.options, - _path, - queryParameters: _queryParameters, - ), - type: DioErrorType.other, - error: error, - )..stackTrace = stackTrace; - } - - final _response = await _dio.request( - _path, - data: _bodyData, - options: _options, - queryParameters: _queryParameters, - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - return _response; - } - - /// fakeOuterBooleanSerialize - /// Test serialization of outer boolean types - /// - /// Parameters: - /// * [body] - Input boolean as post body - /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation - /// * [headers] - Can be used to add additional headers to the request - /// * [extras] - Can be used to add flags to the request - /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response - /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress - /// * [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 - Future> fakeOuterBooleanSerialize({ - bool? body, - CancelToken? cancelToken, - Map? headers, - Map? extra, - ValidateStatus? validateStatus, - ProgressCallback? onSendProgress, - ProgressCallback? onReceiveProgress, - }) async { - final _path = r'/fake/outer/boolean'; - final _options = Options( - method: r'POST', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - contentType: 'application/json', - validateStatus: validateStatus, - ); - - dynamic _bodyData; - - try { - _bodyData = body; - - } catch(error, stackTrace) { - throw DioError( - requestOptions: _options.compose( - _dio.options, - _path, - ), - type: DioErrorType.other, - error: error, - )..stackTrace = stackTrace; - } - - final _response = await _dio.request( - _path, - data: _bodyData, - options: _options, - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - bool _responseData; - - try { - _responseData = _response.data as bool; - - } catch (error, stackTrace) { - throw DioError( - requestOptions: _response.requestOptions, - response: _response, - type: DioErrorType.other, - error: error, - )..stackTrace = stackTrace; - } - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - requestOptions: _response.requestOptions, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// fakeOuterCompositeSerialize - /// Test serialization of object with outer number type - /// - /// Parameters: - /// * [outerComposite] - Input composite as post body - /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation - /// * [headers] - Can be used to add additional headers to the request - /// * [extras] - Can be used to add flags to the request - /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response - /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress - /// * [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 - Future> fakeOuterCompositeSerialize({ - OuterComposite? outerComposite, - CancelToken? cancelToken, - Map? headers, - Map? extra, - ValidateStatus? validateStatus, - ProgressCallback? onSendProgress, - ProgressCallback? onReceiveProgress, - }) async { - final _path = r'/fake/outer/composite'; - final _options = Options( - method: r'POST', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - contentType: 'application/json', - validateStatus: validateStatus, - ); - - dynamic _bodyData; - - try { - const _type = FullType(OuterComposite); - _bodyData = outerComposite == null ? null : _serializers.serialize(outerComposite, specifiedType: _type); - - } catch(error, stackTrace) { - throw DioError( - requestOptions: _options.compose( - _dio.options, - _path, - ), - type: DioErrorType.other, - error: error, - )..stackTrace = stackTrace; - } - - final _response = await _dio.request( - _path, - data: _bodyData, - options: _options, - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - OuterComposite _responseData; - - try { - const _responseType = FullType(OuterComposite); - _responseData = _serializers.deserialize( - _response.data!, - specifiedType: _responseType, - ) as OuterComposite; - - } catch (error, stackTrace) { - throw DioError( - requestOptions: _response.requestOptions, - response: _response, - type: DioErrorType.other, - error: error, - )..stackTrace = stackTrace; - } - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - requestOptions: _response.requestOptions, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// fakeOuterNumberSerialize - /// Test serialization of outer number types - /// - /// Parameters: - /// * [body] - Input number as post body - /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation - /// * [headers] - Can be used to add additional headers to the request - /// * [extras] - Can be used to add flags to the request - /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response - /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress - /// * [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 - Future> fakeOuterNumberSerialize({ - num? body, - CancelToken? cancelToken, - Map? headers, - Map? extra, - ValidateStatus? validateStatus, - ProgressCallback? onSendProgress, - ProgressCallback? onReceiveProgress, - }) async { - final _path = r'/fake/outer/number'; - final _options = Options( - method: r'POST', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - contentType: 'application/json', - validateStatus: validateStatus, - ); - - dynamic _bodyData; - - try { - _bodyData = body; - - } catch(error, stackTrace) { - throw DioError( - requestOptions: _options.compose( - _dio.options, - _path, - ), - type: DioErrorType.other, - error: error, - )..stackTrace = stackTrace; - } - - final _response = await _dio.request( - _path, - data: _bodyData, - options: _options, - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - num _responseData; - - try { - _responseData = _response.data as num; - - } catch (error, stackTrace) { - throw DioError( - requestOptions: _response.requestOptions, - response: _response, - type: DioErrorType.other, - error: error, - )..stackTrace = stackTrace; - } - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - requestOptions: _response.requestOptions, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// fakeOuterStringSerialize - /// Test serialization of outer string types - /// - /// Parameters: - /// * [body] - Input string as post body - /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation - /// * [headers] - Can be used to add additional headers to the request - /// * [extras] - Can be used to add flags to the request - /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response - /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress - /// * [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 - Future> fakeOuterStringSerialize({ - String? body, - CancelToken? cancelToken, - Map? headers, - Map? extra, - ValidateStatus? validateStatus, - ProgressCallback? onSendProgress, - ProgressCallback? onReceiveProgress, - }) async { - final _path = r'/fake/outer/string'; - final _options = Options( - method: r'POST', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - contentType: 'application/json', - validateStatus: validateStatus, - ); - - dynamic _bodyData; - - try { - _bodyData = body; - - } catch(error, stackTrace) { - throw DioError( - requestOptions: _options.compose( - _dio.options, - _path, - ), - type: DioErrorType.other, - error: error, - )..stackTrace = stackTrace; - } - - final _response = await _dio.request( - _path, - data: _bodyData, - options: _options, - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - String _responseData; - - try { - _responseData = _response.data as String; - - } catch (error, stackTrace) { - throw DioError( - requestOptions: _response.requestOptions, - response: _response, - type: DioErrorType.other, - error: error, - )..stackTrace = stackTrace; - } - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - requestOptions: _response.requestOptions, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// fakePropertyEnumIntegerSerialize - /// Test serialization of enum (int) properties with examples - /// - /// Parameters: - /// * [outerObjectWithEnumProperty] - Input enum (int) as post body - /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation - /// * [headers] - Can be used to add additional headers to the request - /// * [extras] - Can be used to add flags to the request - /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response - /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress - /// * [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 - Future> fakePropertyEnumIntegerSerialize({ - required OuterObjectWithEnumProperty outerObjectWithEnumProperty, - CancelToken? cancelToken, - Map? headers, - Map? extra, - ValidateStatus? validateStatus, - ProgressCallback? onSendProgress, - ProgressCallback? onReceiveProgress, - }) async { - final _path = r'/fake/property/enum-int'; - final _options = Options( - method: r'POST', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - contentType: 'application/json', - validateStatus: validateStatus, - ); - - dynamic _bodyData; - - try { - const _type = FullType(OuterObjectWithEnumProperty); - _bodyData = _serializers.serialize(outerObjectWithEnumProperty, specifiedType: _type); - - } catch(error, stackTrace) { - throw DioError( - requestOptions: _options.compose( - _dio.options, - _path, - ), - type: DioErrorType.other, - error: error, - )..stackTrace = stackTrace; - } - - final _response = await _dio.request( - _path, - data: _bodyData, - options: _options, - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - OuterObjectWithEnumProperty _responseData; - - try { - const _responseType = FullType(OuterObjectWithEnumProperty); - _responseData = _serializers.deserialize( - _response.data!, - specifiedType: _responseType, - ) as OuterObjectWithEnumProperty; - - } catch (error, stackTrace) { - throw DioError( - requestOptions: _response.requestOptions, - response: _response, - type: DioErrorType.other, - error: error, - )..stackTrace = stackTrace; - } - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - requestOptions: _response.requestOptions, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// testBodyWithBinary - /// For this test, the body has to be a binary file. - /// - /// Parameters: - /// * [body] - image to upload - /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation - /// * [headers] - Can be used to add additional headers to the request - /// * [extras] - Can be used to add flags to the request - /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response - /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress - /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress - /// - /// Returns a [Future] - /// Throws [DioError] if API call or serialization fails - Future> testBodyWithBinary({ - MultipartFile? body, - CancelToken? cancelToken, - Map? headers, - Map? extra, - ValidateStatus? validateStatus, - ProgressCallback? onSendProgress, - ProgressCallback? onReceiveProgress, - }) async { - final _path = r'/fake/body-with-binary'; - final _options = Options( - method: r'PUT', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - contentType: 'image/png', - validateStatus: validateStatus, - ); - - dynamic _bodyData; - - try { - _bodyData = body?.finalize(); - - } catch(error, stackTrace) { - throw DioError( - requestOptions: _options.compose( - _dio.options, - _path, - ), - type: DioErrorType.other, - error: error, - )..stackTrace = stackTrace; - } - - final _response = await _dio.request( - _path, - data: _bodyData, - options: _options, - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - return _response; - } - - /// testBodyWithFileSchema - /// For this test, the body for this request must reference a schema named `File`. - /// - /// Parameters: - /// * [fileSchemaTestClass] - /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation - /// * [headers] - Can be used to add additional headers to the request - /// * [extras] - Can be used to add flags to the request - /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response - /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress - /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress - /// - /// Returns a [Future] - /// Throws [DioError] if API call or serialization fails - Future> testBodyWithFileSchema({ - required FileSchemaTestClass fileSchemaTestClass, - CancelToken? cancelToken, - Map? headers, - Map? extra, - ValidateStatus? validateStatus, - ProgressCallback? onSendProgress, - ProgressCallback? onReceiveProgress, - }) async { - final _path = r'/fake/body-with-file-schema'; - final _options = Options( - method: r'PUT', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - contentType: 'application/json', - validateStatus: validateStatus, - ); - - dynamic _bodyData; - - try { - const _type = FullType(FileSchemaTestClass); - _bodyData = _serializers.serialize(fileSchemaTestClass, specifiedType: _type); - - } catch(error, stackTrace) { - throw DioError( - requestOptions: _options.compose( - _dio.options, - _path, - ), - type: DioErrorType.other, - error: error, - )..stackTrace = stackTrace; - } - - final _response = await _dio.request( - _path, - data: _bodyData, - options: _options, - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - return _response; - } - - /// testBodyWithQueryParams - /// - /// - /// Parameters: - /// * [query] - /// * [user] - /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation - /// * [headers] - Can be used to add additional headers to the request - /// * [extras] - Can be used to add flags to the request - /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response - /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress - /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress - /// - /// Returns a [Future] - /// Throws [DioError] if API call or serialization fails - Future> testBodyWithQueryParams({ - required String query, - required User user, - CancelToken? cancelToken, - Map? headers, - Map? extra, - ValidateStatus? validateStatus, - ProgressCallback? onSendProgress, - ProgressCallback? onReceiveProgress, - }) async { - final _path = r'/fake/body-with-query-params'; - final _options = Options( - method: r'PUT', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - contentType: 'application/json', - validateStatus: validateStatus, - ); - - final _queryParameters = { - r'query': encodeQueryParameter(_serializers, query, const FullType(String)), - }; - - dynamic _bodyData; - - try { - const _type = FullType(User); - _bodyData = _serializers.serialize(user, specifiedType: _type); - - } catch(error, stackTrace) { - throw DioError( - requestOptions: _options.compose( - _dio.options, - _path, - queryParameters: _queryParameters, - ), - type: DioErrorType.other, - error: error, - )..stackTrace = stackTrace; - } - - final _response = await _dio.request( - _path, - data: _bodyData, - options: _options, - queryParameters: _queryParameters, - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - return _response; - } - - /// To test \"client\" model - /// To test \"client\" model - /// - /// Parameters: - /// * [modelClient] - client model - /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation - /// * [headers] - Can be used to add additional headers to the request - /// * [extras] - Can be used to add flags to the request - /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response - /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress - /// * [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 - Future> testClientModel({ - required ModelClient modelClient, - CancelToken? cancelToken, - Map? headers, - Map? extra, - ValidateStatus? validateStatus, - ProgressCallback? onSendProgress, - ProgressCallback? onReceiveProgress, - }) async { - final _path = r'/fake'; - final _options = Options( - method: r'PATCH', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - contentType: 'application/json', - validateStatus: validateStatus, - ); - - dynamic _bodyData; - - try { - const _type = FullType(ModelClient); - _bodyData = _serializers.serialize(modelClient, specifiedType: _type); - - } catch(error, stackTrace) { - throw DioError( - requestOptions: _options.compose( - _dio.options, - _path, - ), - type: DioErrorType.other, - error: error, - )..stackTrace = stackTrace; - } - - final _response = await _dio.request( - _path, - data: _bodyData, - options: _options, - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - ModelClient _responseData; - - try { - const _responseType = FullType(ModelClient); - _responseData = _serializers.deserialize( - _response.data!, - specifiedType: _responseType, - ) as ModelClient; - - } catch (error, stackTrace) { - throw DioError( - requestOptions: _response.requestOptions, - response: _response, - type: DioErrorType.other, - error: error, - )..stackTrace = stackTrace; - } - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - requestOptions: _response.requestOptions, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - /// - /// Parameters: - /// * [number] - None - /// * [double_] - None - /// * [patternWithoutDelimiter] - None - /// * [byte] - None - /// * [integer] - None - /// * [int32] - None - /// * [int64] - None - /// * [float] - None - /// * [string] - None - /// * [binary] - None - /// * [date] - None - /// * [dateTime] - None - /// * [password] - None - /// * [callback] - None - /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation - /// * [headers] - Can be used to add additional headers to the request - /// * [extras] - Can be used to add flags to the request - /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response - /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress - /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress - /// - /// Returns a [Future] - /// Throws [DioError] if API call or serialization fails - Future> testEndpointParameters({ - required num number, - required double double_, - required String patternWithoutDelimiter, - required String byte, - int? integer, - int? int32, - int? int64, - double? float, - String? string, - Uint8List? binary, - Date? date, - DateTime? dateTime, - String? password, - String? callback, - CancelToken? cancelToken, - Map? headers, - Map? extra, - ValidateStatus? validateStatus, - ProgressCallback? onSendProgress, - ProgressCallback? onReceiveProgress, - }) async { - final _path = r'/fake'; - final _options = Options( - method: r'POST', - headers: { - ...?headers, - }, - extra: { - 'secure': >[ - { - 'type': 'http', - 'scheme': 'basic', - 'name': 'http_basic_test', - }, - ], - ...?extra, - }, - contentType: 'application/x-www-form-urlencoded', - validateStatus: validateStatus, - ); - - dynamic _bodyData; - - try { - _bodyData = { - if (integer != null) r'integer': encodeQueryParameter(_serializers, integer, const FullType(int)), - if (int32 != null) r'int32': encodeQueryParameter(_serializers, int32, const FullType(int)), - if (int64 != null) r'int64': encodeQueryParameter(_serializers, int64, const FullType(int)), - r'number': encodeQueryParameter(_serializers, number, const FullType(num)), - if (float != null) r'float': encodeQueryParameter(_serializers, float, const FullType(double)), - r'double': encodeQueryParameter(_serializers, double_, const FullType(double)), - if (string != null) r'string': encodeQueryParameter(_serializers, string, const FullType(String)), - r'pattern_without_delimiter': encodeQueryParameter(_serializers, patternWithoutDelimiter, const FullType(String)), - r'byte': encodeQueryParameter(_serializers, byte, const FullType(String)), - if (binary != null) r'binary': encodeQueryParameter(_serializers, binary, const FullType(Uint8List)), - if (date != null) r'date': encodeQueryParameter(_serializers, date, const FullType(Date)), - if (dateTime != null) r'dateTime': encodeQueryParameter(_serializers, dateTime, const FullType(DateTime)), - if (password != null) r'password': encodeQueryParameter(_serializers, password, const FullType(String)), - if (callback != null) r'callback': encodeQueryParameter(_serializers, callback, const FullType(String)), - }; - - } catch(error, stackTrace) { - throw DioError( - requestOptions: _options.compose( - _dio.options, - _path, - ), - type: DioErrorType.other, - error: error, - )..stackTrace = stackTrace; - } - - final _response = await _dio.request( - _path, - data: _bodyData, - options: _options, - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - return _response; - } - - /// To test enum parameters - /// To test enum parameters - /// - /// Parameters: - /// * [enumHeaderStringArray] - Header parameter enum test (string array) - /// * [enumHeaderString] - Header parameter enum test (string) - /// * [enumQueryStringArray] - Query parameter enum test (string array) - /// * [enumQueryString] - Query parameter enum test (string) - /// * [enumQueryInteger] - Query parameter enum test (double) - /// * [enumQueryDouble] - Query parameter enum test (double) - /// * [enumFormStringArray] - Form parameter enum test (string array) - /// * [enumFormString] - Form parameter enum test (string) - /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation - /// * [headers] - Can be used to add additional headers to the request - /// * [extras] - Can be used to add flags to the request - /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response - /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress - /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress - /// - /// Returns a [Future] - /// Throws [DioError] if API call or serialization fails - Future> testEnumParameters({ - BuiltList? enumHeaderStringArray, - String? enumHeaderString = '-efg', - BuiltList? enumQueryStringArray, - String? enumQueryString = '-efg', - int? enumQueryInteger, - double? enumQueryDouble, - BuiltList? enumFormStringArray, - String? enumFormString, - CancelToken? cancelToken, - Map? headers, - Map? extra, - ValidateStatus? validateStatus, - ProgressCallback? onSendProgress, - ProgressCallback? onReceiveProgress, - }) async { - final _path = r'/fake'; - final _options = Options( - method: r'GET', - headers: { - if (enumHeaderStringArray != null) r'enum_header_string_array': enumHeaderStringArray, - if (enumHeaderString != null) r'enum_header_string': enumHeaderString, - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - contentType: 'application/x-www-form-urlencoded', - validateStatus: validateStatus, - ); - - final _queryParameters = { - if (enumQueryStringArray != null) r'enum_query_string_array': encodeCollectionQueryParameter(_serializers, enumQueryStringArray, const FullType(BuiltList, [FullType(String)]), format: ListFormat.multi,), - if (enumQueryString != null) r'enum_query_string': encodeQueryParameter(_serializers, enumQueryString, const FullType(String)), - if (enumQueryInteger != null) r'enum_query_integer': encodeQueryParameter(_serializers, enumQueryInteger, const FullType(int)), - if (enumQueryDouble != null) r'enum_query_double': encodeQueryParameter(_serializers, enumQueryDouble, const FullType(double)), - }; - - dynamic _bodyData; - - try { - _bodyData = { - if (enumFormStringArray != null) r'enum_form_string_array': encodeCollectionQueryParameter(_serializers, enumFormStringArray, const FullType(BuiltList, [FullType(String)]), format: ListFormat.csv,), - if (enumFormString != null) r'enum_form_string': encodeQueryParameter(_serializers, enumFormString, const FullType(String)), - }; - - } catch(error, stackTrace) { - throw DioError( - requestOptions: _options.compose( - _dio.options, - _path, - queryParameters: _queryParameters, - ), - type: DioErrorType.other, - error: error, - )..stackTrace = stackTrace; - } - - final _response = await _dio.request( - _path, - data: _bodyData, - options: _options, - queryParameters: _queryParameters, - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - return _response; - } - - /// Fake endpoint to test group parameters (optional) - /// Fake endpoint to test group parameters (optional) - /// - /// Parameters: - /// * [requiredStringGroup] - Required String in group parameters - /// * [requiredBooleanGroup] - Required Boolean in group parameters - /// * [requiredInt64Group] - Required Integer in group parameters - /// * [stringGroup] - String in group parameters - /// * [booleanGroup] - Boolean in group parameters - /// * [int64Group] - Integer in group parameters - /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation - /// * [headers] - Can be used to add additional headers to the request - /// * [extras] - Can be used to add flags to the request - /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response - /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress - /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress - /// - /// Returns a [Future] - /// Throws [DioError] if API call or serialization fails - Future> testGroupParameters({ - required int requiredStringGroup, - required bool requiredBooleanGroup, - required int requiredInt64Group, - int? stringGroup, - bool? booleanGroup, - int? int64Group, - CancelToken? cancelToken, - Map? headers, - Map? extra, - ValidateStatus? validateStatus, - ProgressCallback? onSendProgress, - ProgressCallback? onReceiveProgress, - }) async { - final _path = r'/fake'; - final _options = Options( - method: r'DELETE', - headers: { - r'required_boolean_group': requiredBooleanGroup, - if (booleanGroup != null) r'boolean_group': booleanGroup, - ...?headers, - }, - extra: { - 'secure': >[ - { - 'type': 'http', - 'scheme': 'bearer', - 'name': 'bearer_test', - }, - ], - ...?extra, - }, - validateStatus: validateStatus, - ); - - final _queryParameters = { - r'required_string_group': encodeQueryParameter(_serializers, requiredStringGroup, const FullType(int)), - r'required_int64_group': encodeQueryParameter(_serializers, requiredInt64Group, const FullType(int)), - if (stringGroup != null) r'string_group': encodeQueryParameter(_serializers, stringGroup, const FullType(int)), - if (int64Group != null) r'int64_group': encodeQueryParameter(_serializers, int64Group, const FullType(int)), - }; - - final _response = await _dio.request( - _path, - options: _options, - queryParameters: _queryParameters, - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - return _response; - } - - /// test inline additionalProperties - /// - /// - /// Parameters: - /// * [requestBody] - request body - /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation - /// * [headers] - Can be used to add additional headers to the request - /// * [extras] - Can be used to add flags to the request - /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response - /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress - /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress - /// - /// Returns a [Future] - /// Throws [DioError] if API call or serialization fails - Future> testInlineAdditionalProperties({ - required BuiltMap requestBody, - CancelToken? cancelToken, - Map? headers, - Map? extra, - ValidateStatus? validateStatus, - ProgressCallback? onSendProgress, - ProgressCallback? onReceiveProgress, - }) async { - final _path = r'/fake/inline-additionalProperties'; - final _options = Options( - method: r'POST', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - contentType: 'application/json', - validateStatus: validateStatus, - ); - - dynamic _bodyData; - - try { - const _type = FullType(BuiltMap, [FullType(String), FullType(String)]); - _bodyData = _serializers.serialize(requestBody, specifiedType: _type); - - } catch(error, stackTrace) { - throw DioError( - requestOptions: _options.compose( - _dio.options, - _path, - ), - type: DioErrorType.other, - error: error, - )..stackTrace = stackTrace; - } - - final _response = await _dio.request( - _path, - data: _bodyData, - options: _options, - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - return _response; - } - - /// test json serialization of form data - /// - /// - /// Parameters: - /// * [param] - field1 - /// * [param2] - field2 - /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation - /// * [headers] - Can be used to add additional headers to the request - /// * [extras] - Can be used to add flags to the request - /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response - /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress - /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress - /// - /// Returns a [Future] - /// Throws [DioError] if API call or serialization fails - Future> testJsonFormData({ - required String param, - required String param2, - CancelToken? cancelToken, - Map? headers, - Map? extra, - ValidateStatus? validateStatus, - ProgressCallback? onSendProgress, - ProgressCallback? onReceiveProgress, - }) async { - final _path = r'/fake/jsonFormData'; - final _options = Options( - method: r'GET', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - contentType: 'application/x-www-form-urlencoded', - validateStatus: validateStatus, - ); - - dynamic _bodyData; - - try { - _bodyData = { - r'param': encodeQueryParameter(_serializers, param, const FullType(String)), - r'param2': encodeQueryParameter(_serializers, param2, const FullType(String)), - }; - - } catch(error, stackTrace) { - throw DioError( - requestOptions: _options.compose( - _dio.options, - _path, - ), - type: DioErrorType.other, - error: error, - )..stackTrace = stackTrace; - } - - final _response = await _dio.request( - _path, - data: _bodyData, - options: _options, - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - return _response; - } - - /// testQueryParameterCollectionFormat - /// To test the collection format in query parameters - /// - /// Parameters: - /// * [pipe] - /// * [ioutil] - /// * [http] - /// * [url] - /// * [context] - /// * [allowEmpty] - /// * [language] - /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation - /// * [headers] - Can be used to add additional headers to the request - /// * [extras] - Can be used to add flags to the request - /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response - /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress - /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress - /// - /// Returns a [Future] - /// Throws [DioError] if API call or serialization fails - Future> testQueryParameterCollectionFormat({ - required BuiltList pipe, - required BuiltList ioutil, - required BuiltList http, - required BuiltList url, - required BuiltList context, - required String allowEmpty, - BuiltMap? language, - CancelToken? cancelToken, - Map? headers, - Map? extra, - ValidateStatus? validateStatus, - ProgressCallback? onSendProgress, - ProgressCallback? onReceiveProgress, - }) async { - final _path = r'/fake/test-query-parameters'; - final _options = Options( - method: r'PUT', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - ); - - final _queryParameters = { - r'pipe': encodeCollectionQueryParameter(_serializers, pipe, const FullType(BuiltList, [FullType(String)]), format: ListFormat.pipes,), - r'ioutil': encodeCollectionQueryParameter(_serializers, ioutil, const FullType(BuiltList, [FullType(String)]), format: ListFormat.csv,), - r'http': encodeCollectionQueryParameter(_serializers, http, const FullType(BuiltList, [FullType(String)]), format: ListFormat.ssv,), - r'url': encodeCollectionQueryParameter(_serializers, url, const FullType(BuiltList, [FullType(String)]), format: ListFormat.csv,), - r'context': encodeCollectionQueryParameter(_serializers, context, const FullType(BuiltList, [FullType(String)]), format: ListFormat.multi,), - if (language != null) r'language': encodeQueryParameter(_serializers, language, const FullType(BuiltMap, [FullType(String), FullType(String)]), ), - r'allowEmpty': encodeQueryParameter(_serializers, allowEmpty, const FullType(String)), - }; - - final _response = await _dio.request( - _path, - options: _options, - queryParameters: _queryParameters, - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - return _response; - } - -} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/api/fake_classname_tags123_api.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/api/fake_classname_tags123_api.dart deleted file mode 100644 index e39c39e2f5d..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/api/fake_classname_tags123_api.dart +++ /dev/null @@ -1,120 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -import 'dart:async'; - -import 'package:built_value/serializer.dart'; -import 'package:dio_http/dio_http.dart'; - -import 'package:openapi/src/model/model_client.dart'; - -class FakeClassnameTags123Api { - - final Dio _dio; - - final Serializers _serializers; - - const FakeClassnameTags123Api(this._dio, this._serializers); - - /// To test class name in snake case - /// To test class name in snake case - /// - /// Parameters: - /// * [modelClient] - client model - /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation - /// * [headers] - Can be used to add additional headers to the request - /// * [extras] - Can be used to add flags to the request - /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response - /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress - /// * [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 - Future> testClassname({ - required ModelClient modelClient, - CancelToken? cancelToken, - Map? headers, - Map? extra, - ValidateStatus? validateStatus, - ProgressCallback? onSendProgress, - ProgressCallback? onReceiveProgress, - }) async { - final _path = r'/fake_classname_test'; - final _options = Options( - method: r'PATCH', - headers: { - ...?headers, - }, - extra: { - 'secure': >[ - { - 'type': 'apiKey', - 'name': 'api_key_query', - 'keyName': 'api_key_query', - 'where': 'query', - }, - ], - ...?extra, - }, - contentType: 'application/json', - validateStatus: validateStatus, - ); - - dynamic _bodyData; - - try { - const _type = FullType(ModelClient); - _bodyData = _serializers.serialize(modelClient, specifiedType: _type); - - } catch(error, stackTrace) { - throw DioError( - requestOptions: _options.compose( - _dio.options, - _path, - ), - type: DioErrorType.other, - error: error, - )..stackTrace = stackTrace; - } - - final _response = await _dio.request( - _path, - data: _bodyData, - options: _options, - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - ModelClient _responseData; - - try { - const _responseType = FullType(ModelClient); - _responseData = _serializers.deserialize( - _response.data!, - specifiedType: _responseType, - ) as ModelClient; - - } catch (error, stackTrace) { - throw DioError( - requestOptions: _response.requestOptions, - response: _response, - type: DioErrorType.other, - error: error, - )..stackTrace = stackTrace; - } - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - requestOptions: _response.requestOptions, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - -} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/api/pet_api.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/api/pet_api.dart deleted file mode 100644 index a1d8a0fc2d7..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/api/pet_api.dart +++ /dev/null @@ -1,755 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -import 'dart:async'; - -import 'package:built_value/serializer.dart'; -import 'package:dio_http/dio_http.dart'; - -import 'package:built_collection/built_collection.dart'; -import 'package:openapi/src/api_util.dart'; -import 'package:openapi/src/model/api_response.dart'; -import 'package:openapi/src/model/pet.dart'; - -class PetApi { - - final Dio _dio; - - final Serializers _serializers; - - const PetApi(this._dio, this._serializers); - - /// Add a new pet to the store - /// - /// - /// Parameters: - /// * [pet] - Pet object that needs to be added to the store - /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation - /// * [headers] - Can be used to add additional headers to the request - /// * [extras] - Can be used to add flags to the request - /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response - /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress - /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress - /// - /// Returns a [Future] - /// Throws [DioError] if API call or serialization fails - Future> addPet({ - required Pet pet, - CancelToken? cancelToken, - Map? headers, - Map? extra, - ValidateStatus? validateStatus, - ProgressCallback? onSendProgress, - ProgressCallback? onReceiveProgress, - }) async { - final _path = r'/pet'; - final _options = Options( - method: r'POST', - headers: { - ...?headers, - }, - extra: { - 'secure': >[ - { - 'type': 'oauth2', - 'name': 'petstore_auth', - }, - ], - ...?extra, - }, - contentType: 'application/json', - validateStatus: validateStatus, - ); - - dynamic _bodyData; - - try { - const _type = FullType(Pet); - _bodyData = _serializers.serialize(pet, specifiedType: _type); - - } catch(error, stackTrace) { - throw DioError( - requestOptions: _options.compose( - _dio.options, - _path, - ), - type: DioErrorType.other, - error: error, - )..stackTrace = stackTrace; - } - - final _response = await _dio.request( - _path, - data: _bodyData, - options: _options, - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - return _response; - } - - /// Deletes a pet - /// - /// - /// Parameters: - /// * [petId] - Pet id to delete - /// * [apiKey] - /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation - /// * [headers] - Can be used to add additional headers to the request - /// * [extras] - Can be used to add flags to the request - /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response - /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress - /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress - /// - /// Returns a [Future] - /// Throws [DioError] if API call or serialization fails - Future> deletePet({ - required int petId, - String? apiKey, - CancelToken? cancelToken, - Map? headers, - Map? extra, - ValidateStatus? validateStatus, - ProgressCallback? onSendProgress, - ProgressCallback? onReceiveProgress, - }) async { - final _path = r'/pet/{petId}'.replaceAll('{' r'petId' '}', petId.toString()); - final _options = Options( - method: r'DELETE', - headers: { - if (apiKey != null) r'api_key': apiKey, - ...?headers, - }, - extra: { - 'secure': >[ - { - 'type': 'oauth2', - 'name': 'petstore_auth', - }, - ], - ...?extra, - }, - validateStatus: validateStatus, - ); - - final _response = await _dio.request( - _path, - options: _options, - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - return _response; - } - - /// Finds Pets by status - /// Multiple status values can be provided with comma separated strings - /// - /// Parameters: - /// * [status] - Status values that need to be considered for filter - /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation - /// * [headers] - Can be used to add additional headers to the request - /// * [extras] - Can be used to add flags to the request - /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response - /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress - /// * [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 - Future>> findPetsByStatus({ - required BuiltList status, - CancelToken? cancelToken, - Map? headers, - Map? extra, - ValidateStatus? validateStatus, - ProgressCallback? onSendProgress, - ProgressCallback? onReceiveProgress, - }) async { - final _path = r'/pet/findByStatus'; - final _options = Options( - method: r'GET', - headers: { - ...?headers, - }, - extra: { - 'secure': >[ - { - 'type': 'oauth2', - 'name': 'petstore_auth', - }, - ], - ...?extra, - }, - validateStatus: validateStatus, - ); - - final _queryParameters = { - r'status': encodeCollectionQueryParameter(_serializers, status, const FullType(BuiltList, [FullType(String)]), format: ListFormat.csv,), - }; - - final _response = await _dio.request( - _path, - options: _options, - queryParameters: _queryParameters, - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - BuiltList _responseData; - - try { - const _responseType = FullType(BuiltList, [FullType(Pet)]); - _responseData = _serializers.deserialize( - _response.data!, - specifiedType: _responseType, - ) as BuiltList; - - } catch (error, stackTrace) { - throw DioError( - requestOptions: _response.requestOptions, - response: _response, - type: DioErrorType.other, - error: error, - )..stackTrace = stackTrace; - } - - return Response>( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - requestOptions: _response.requestOptions, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// Finds Pets by tags - /// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - /// - /// Parameters: - /// * [tags] - Tags to filter by - /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation - /// * [headers] - Can be used to add additional headers to the request - /// * [extras] - Can be used to add flags to the request - /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response - /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress - /// * [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 - @Deprecated('This operation has been deprecated') - Future>> findPetsByTags({ - required BuiltSet tags, - CancelToken? cancelToken, - Map? headers, - Map? extra, - ValidateStatus? validateStatus, - ProgressCallback? onSendProgress, - ProgressCallback? onReceiveProgress, - }) async { - final _path = r'/pet/findByTags'; - final _options = Options( - method: r'GET', - headers: { - ...?headers, - }, - extra: { - 'secure': >[ - { - 'type': 'oauth2', - 'name': 'petstore_auth', - }, - ], - ...?extra, - }, - validateStatus: validateStatus, - ); - - final _queryParameters = { - r'tags': encodeCollectionQueryParameter(_serializers, tags, const FullType(BuiltSet, [FullType(String)]), format: ListFormat.csv,), - }; - - final _response = await _dio.request( - _path, - options: _options, - queryParameters: _queryParameters, - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - BuiltSet _responseData; - - try { - const _responseType = FullType(BuiltSet, [FullType(Pet)]); - _responseData = _serializers.deserialize( - _response.data!, - specifiedType: _responseType, - ) as BuiltSet; - - } catch (error, stackTrace) { - throw DioError( - requestOptions: _response.requestOptions, - response: _response, - type: DioErrorType.other, - error: error, - )..stackTrace = stackTrace; - } - - return Response>( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - requestOptions: _response.requestOptions, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// Find pet by ID - /// Returns a single pet - /// - /// Parameters: - /// * [petId] - ID of pet to return - /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation - /// * [headers] - Can be used to add additional headers to the request - /// * [extras] - Can be used to add flags to the request - /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response - /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress - /// * [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 - Future> getPetById({ - required int petId, - CancelToken? cancelToken, - Map? headers, - Map? extra, - ValidateStatus? validateStatus, - ProgressCallback? onSendProgress, - ProgressCallback? onReceiveProgress, - }) async { - final _path = r'/pet/{petId}'.replaceAll('{' r'petId' '}', petId.toString()); - final _options = Options( - method: r'GET', - headers: { - ...?headers, - }, - extra: { - 'secure': >[ - { - 'type': 'apiKey', - 'name': 'api_key', - 'keyName': 'api_key', - 'where': 'header', - }, - ], - ...?extra, - }, - validateStatus: validateStatus, - ); - - final _response = await _dio.request( - _path, - options: _options, - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - Pet _responseData; - - try { - const _responseType = FullType(Pet); - _responseData = _serializers.deserialize( - _response.data!, - specifiedType: _responseType, - ) as Pet; - - } catch (error, stackTrace) { - throw DioError( - requestOptions: _response.requestOptions, - response: _response, - type: DioErrorType.other, - error: error, - )..stackTrace = stackTrace; - } - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - requestOptions: _response.requestOptions, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// Update an existing pet - /// - /// - /// Parameters: - /// * [pet] - Pet object that needs to be added to the store - /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation - /// * [headers] - Can be used to add additional headers to the request - /// * [extras] - Can be used to add flags to the request - /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response - /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress - /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress - /// - /// Returns a [Future] - /// Throws [DioError] if API call or serialization fails - Future> updatePet({ - required Pet pet, - CancelToken? cancelToken, - Map? headers, - Map? extra, - ValidateStatus? validateStatus, - ProgressCallback? onSendProgress, - ProgressCallback? onReceiveProgress, - }) async { - final _path = r'/pet'; - final _options = Options( - method: r'PUT', - headers: { - ...?headers, - }, - extra: { - 'secure': >[ - { - 'type': 'oauth2', - 'name': 'petstore_auth', - }, - ], - ...?extra, - }, - contentType: 'application/json', - validateStatus: validateStatus, - ); - - dynamic _bodyData; - - try { - const _type = FullType(Pet); - _bodyData = _serializers.serialize(pet, specifiedType: _type); - - } catch(error, stackTrace) { - throw DioError( - requestOptions: _options.compose( - _dio.options, - _path, - ), - type: DioErrorType.other, - error: error, - )..stackTrace = stackTrace; - } - - final _response = await _dio.request( - _path, - data: _bodyData, - options: _options, - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - return _response; - } - - /// Updates a pet in the store with form data - /// - /// - /// Parameters: - /// * [petId] - ID of pet that needs to be updated - /// * [name] - Updated name of the pet - /// * [status] - Updated status of the pet - /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation - /// * [headers] - Can be used to add additional headers to the request - /// * [extras] - Can be used to add flags to the request - /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response - /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress - /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress - /// - /// Returns a [Future] - /// Throws [DioError] if API call or serialization fails - Future> updatePetWithForm({ - required int petId, - String? name, - String? status, - CancelToken? cancelToken, - Map? headers, - Map? extra, - ValidateStatus? validateStatus, - ProgressCallback? onSendProgress, - ProgressCallback? onReceiveProgress, - }) async { - final _path = r'/pet/{petId}'.replaceAll('{' r'petId' '}', petId.toString()); - final _options = Options( - method: r'POST', - headers: { - ...?headers, - }, - extra: { - 'secure': >[ - { - 'type': 'oauth2', - 'name': 'petstore_auth', - }, - ], - ...?extra, - }, - contentType: 'application/x-www-form-urlencoded', - validateStatus: validateStatus, - ); - - dynamic _bodyData; - - try { - _bodyData = { - if (name != null) r'name': encodeQueryParameter(_serializers, name, const FullType(String)), - if (status != null) r'status': encodeQueryParameter(_serializers, status, const FullType(String)), - }; - - } catch(error, stackTrace) { - throw DioError( - requestOptions: _options.compose( - _dio.options, - _path, - ), - type: DioErrorType.other, - error: error, - )..stackTrace = stackTrace; - } - - final _response = await _dio.request( - _path, - data: _bodyData, - options: _options, - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - return _response; - } - - /// uploads an image - /// - /// - /// Parameters: - /// * [petId] - ID of pet to update - /// * [additionalMetadata] - Additional data to pass to server - /// * [file] - file to upload - /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation - /// * [headers] - Can be used to add additional headers to the request - /// * [extras] - Can be used to add flags to the request - /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response - /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress - /// * [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 - Future> uploadFile({ - required int petId, - String? additionalMetadata, - MultipartFile? file, - CancelToken? cancelToken, - Map? headers, - Map? extra, - ValidateStatus? validateStatus, - ProgressCallback? onSendProgress, - ProgressCallback? onReceiveProgress, - }) async { - final _path = r'/pet/{petId}/uploadImage'.replaceAll('{' r'petId' '}', petId.toString()); - final _options = Options( - method: r'POST', - headers: { - ...?headers, - }, - extra: { - 'secure': >[ - { - 'type': 'oauth2', - 'name': 'petstore_auth', - }, - ], - ...?extra, - }, - contentType: 'multipart/form-data', - validateStatus: validateStatus, - ); - - dynamic _bodyData; - - try { - _bodyData = FormData.fromMap({ - if (additionalMetadata != null) r'additionalMetadata': encodeFormParameter(_serializers, additionalMetadata, const FullType(String)), - if (file != null) r'file': file, - }); - - } catch(error, stackTrace) { - throw DioError( - requestOptions: _options.compose( - _dio.options, - _path, - ), - type: DioErrorType.other, - error: error, - )..stackTrace = stackTrace; - } - - final _response = await _dio.request( - _path, - data: _bodyData, - options: _options, - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - ApiResponse _responseData; - - try { - const _responseType = FullType(ApiResponse); - _responseData = _serializers.deserialize( - _response.data!, - specifiedType: _responseType, - ) as ApiResponse; - - } catch (error, stackTrace) { - throw DioError( - requestOptions: _response.requestOptions, - response: _response, - type: DioErrorType.other, - error: error, - )..stackTrace = stackTrace; - } - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - requestOptions: _response.requestOptions, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// uploads an image (required) - /// - /// - /// Parameters: - /// * [petId] - ID of pet to update - /// * [requiredFile] - file to upload - /// * [additionalMetadata] - Additional data to pass to server - /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation - /// * [headers] - Can be used to add additional headers to the request - /// * [extras] - Can be used to add flags to the request - /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response - /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress - /// * [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 - Future> uploadFileWithRequiredFile({ - required int petId, - required MultipartFile requiredFile, - String? additionalMetadata, - CancelToken? cancelToken, - Map? headers, - Map? extra, - ValidateStatus? validateStatus, - ProgressCallback? onSendProgress, - ProgressCallback? onReceiveProgress, - }) async { - final _path = r'/fake/{petId}/uploadImageWithRequiredFile'.replaceAll('{' r'petId' '}', petId.toString()); - final _options = Options( - method: r'POST', - headers: { - ...?headers, - }, - extra: { - 'secure': >[ - { - 'type': 'oauth2', - 'name': 'petstore_auth', - }, - ], - ...?extra, - }, - contentType: 'multipart/form-data', - validateStatus: validateStatus, - ); - - dynamic _bodyData; - - try { - _bodyData = FormData.fromMap({ - if (additionalMetadata != null) r'additionalMetadata': encodeFormParameter(_serializers, additionalMetadata, const FullType(String)), - r'requiredFile': requiredFile, - }); - - } catch(error, stackTrace) { - throw DioError( - requestOptions: _options.compose( - _dio.options, - _path, - ), - type: DioErrorType.other, - error: error, - )..stackTrace = stackTrace; - } - - final _response = await _dio.request( - _path, - data: _bodyData, - options: _options, - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - ApiResponse _responseData; - - try { - const _responseType = FullType(ApiResponse); - _responseData = _serializers.deserialize( - _response.data!, - specifiedType: _responseType, - ) as ApiResponse; - - } catch (error, stackTrace) { - throw DioError( - requestOptions: _response.requestOptions, - response: _response, - type: DioErrorType.other, - error: error, - )..stackTrace = stackTrace; - } - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - requestOptions: _response.requestOptions, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - -} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/api/store_api.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/api/store_api.dart deleted file mode 100644 index bb10a12cbe5..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/api/store_api.dart +++ /dev/null @@ -1,314 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -import 'dart:async'; - -import 'package:built_value/serializer.dart'; -import 'package:dio_http/dio_http.dart'; - -import 'package:built_collection/built_collection.dart'; -import 'package:openapi/src/model/order.dart'; - -class StoreApi { - - final Dio _dio; - - final Serializers _serializers; - - const StoreApi(this._dio, this._serializers); - - /// Delete purchase order by ID - /// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - /// - /// Parameters: - /// * [orderId] - ID of the order that needs to be deleted - /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation - /// * [headers] - Can be used to add additional headers to the request - /// * [extras] - Can be used to add flags to the request - /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response - /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress - /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress - /// - /// Returns a [Future] - /// Throws [DioError] if API call or serialization fails - Future> deleteOrder({ - required String orderId, - CancelToken? cancelToken, - Map? headers, - Map? extra, - ValidateStatus? validateStatus, - ProgressCallback? onSendProgress, - ProgressCallback? onReceiveProgress, - }) async { - final _path = r'/store/order/{order_id}'.replaceAll('{' r'order_id' '}', orderId.toString()); - final _options = Options( - method: r'DELETE', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - ); - - final _response = await _dio.request( - _path, - options: _options, - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - return _response; - } - - /// Returns pet inventories by status - /// Returns a map of status codes to quantities - /// - /// Parameters: - /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation - /// * [headers] - Can be used to add additional headers to the request - /// * [extras] - Can be used to add flags to the request - /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response - /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress - /// * [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 - Future>> getInventory({ - CancelToken? cancelToken, - Map? headers, - Map? extra, - ValidateStatus? validateStatus, - ProgressCallback? onSendProgress, - ProgressCallback? onReceiveProgress, - }) async { - final _path = r'/store/inventory'; - final _options = Options( - method: r'GET', - headers: { - ...?headers, - }, - extra: { - 'secure': >[ - { - 'type': 'apiKey', - 'name': 'api_key', - 'keyName': 'api_key', - 'where': 'header', - }, - ], - ...?extra, - }, - validateStatus: validateStatus, - ); - - final _response = await _dio.request( - _path, - options: _options, - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - BuiltMap _responseData; - - try { - const _responseType = FullType(BuiltMap, [FullType(String), FullType(int)]); - _responseData = _serializers.deserialize( - _response.data!, - specifiedType: _responseType, - ) as BuiltMap; - - } catch (error, stackTrace) { - throw DioError( - requestOptions: _response.requestOptions, - response: _response, - type: DioErrorType.other, - error: error, - )..stackTrace = stackTrace; - } - - return Response>( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - requestOptions: _response.requestOptions, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// Find purchase order by ID - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - /// - /// Parameters: - /// * [orderId] - ID of pet that needs to be fetched - /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation - /// * [headers] - Can be used to add additional headers to the request - /// * [extras] - Can be used to add flags to the request - /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response - /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress - /// * [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 - Future> getOrderById({ - required int orderId, - CancelToken? cancelToken, - Map? headers, - Map? extra, - ValidateStatus? validateStatus, - ProgressCallback? onSendProgress, - ProgressCallback? onReceiveProgress, - }) async { - final _path = r'/store/order/{order_id}'.replaceAll('{' r'order_id' '}', orderId.toString()); - final _options = Options( - method: r'GET', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - ); - - final _response = await _dio.request( - _path, - options: _options, - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - Order _responseData; - - try { - const _responseType = FullType(Order); - _responseData = _serializers.deserialize( - _response.data!, - specifiedType: _responseType, - ) as Order; - - } catch (error, stackTrace) { - throw DioError( - requestOptions: _response.requestOptions, - response: _response, - type: DioErrorType.other, - error: error, - )..stackTrace = stackTrace; - } - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - requestOptions: _response.requestOptions, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// Place an order for a pet - /// - /// - /// Parameters: - /// * [order] - order placed for purchasing the pet - /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation - /// * [headers] - Can be used to add additional headers to the request - /// * [extras] - Can be used to add flags to the request - /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response - /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress - /// * [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 - Future> placeOrder({ - required Order order, - CancelToken? cancelToken, - Map? headers, - Map? extra, - ValidateStatus? validateStatus, - ProgressCallback? onSendProgress, - ProgressCallback? onReceiveProgress, - }) async { - final _path = r'/store/order'; - final _options = Options( - method: r'POST', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - contentType: 'application/json', - validateStatus: validateStatus, - ); - - dynamic _bodyData; - - try { - const _type = FullType(Order); - _bodyData = _serializers.serialize(order, specifiedType: _type); - - } catch(error, stackTrace) { - throw DioError( - requestOptions: _options.compose( - _dio.options, - _path, - ), - type: DioErrorType.other, - error: error, - )..stackTrace = stackTrace; - } - - final _response = await _dio.request( - _path, - data: _bodyData, - options: _options, - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - Order _responseData; - - try { - const _responseType = FullType(Order); - _responseData = _serializers.deserialize( - _response.data!, - specifiedType: _responseType, - ) as Order; - - } catch (error, stackTrace) { - throw DioError( - requestOptions: _response.requestOptions, - response: _response, - type: DioErrorType.other, - error: error, - )..stackTrace = stackTrace; - } - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - requestOptions: _response.requestOptions, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - -} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/api/user_api.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/api/user_api.dart deleted file mode 100644 index e628b862c02..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/api/user_api.dart +++ /dev/null @@ -1,532 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -import 'dart:async'; - -import 'package:built_value/serializer.dart'; -import 'package:dio_http/dio_http.dart'; - -import 'package:built_collection/built_collection.dart'; -import 'package:openapi/src/api_util.dart'; -import 'package:openapi/src/model/user.dart'; - -class UserApi { - - final Dio _dio; - - final Serializers _serializers; - - const UserApi(this._dio, this._serializers); - - /// Create user - /// This can only be done by the logged in user. - /// - /// Parameters: - /// * [user] - Created user object - /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation - /// * [headers] - Can be used to add additional headers to the request - /// * [extras] - Can be used to add flags to the request - /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response - /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress - /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress - /// - /// Returns a [Future] - /// Throws [DioError] if API call or serialization fails - Future> createUser({ - required User user, - CancelToken? cancelToken, - Map? headers, - Map? extra, - ValidateStatus? validateStatus, - ProgressCallback? onSendProgress, - ProgressCallback? onReceiveProgress, - }) async { - final _path = r'/user'; - final _options = Options( - method: r'POST', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - contentType: 'application/json', - validateStatus: validateStatus, - ); - - dynamic _bodyData; - - try { - const _type = FullType(User); - _bodyData = _serializers.serialize(user, specifiedType: _type); - - } catch(error, stackTrace) { - throw DioError( - requestOptions: _options.compose( - _dio.options, - _path, - ), - type: DioErrorType.other, - error: error, - )..stackTrace = stackTrace; - } - - final _response = await _dio.request( - _path, - data: _bodyData, - options: _options, - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - return _response; - } - - /// Creates list of users with given input array - /// - /// - /// Parameters: - /// * [user] - List of user object - /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation - /// * [headers] - Can be used to add additional headers to the request - /// * [extras] - Can be used to add flags to the request - /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response - /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress - /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress - /// - /// Returns a [Future] - /// Throws [DioError] if API call or serialization fails - Future> createUsersWithArrayInput({ - required BuiltList user, - CancelToken? cancelToken, - Map? headers, - Map? extra, - ValidateStatus? validateStatus, - ProgressCallback? onSendProgress, - ProgressCallback? onReceiveProgress, - }) async { - final _path = r'/user/createWithArray'; - final _options = Options( - method: r'POST', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - contentType: 'application/json', - validateStatus: validateStatus, - ); - - dynamic _bodyData; - - try { - const _type = FullType(BuiltList, [FullType(User)]); - _bodyData = _serializers.serialize(user, specifiedType: _type); - - } catch(error, stackTrace) { - throw DioError( - requestOptions: _options.compose( - _dio.options, - _path, - ), - type: DioErrorType.other, - error: error, - )..stackTrace = stackTrace; - } - - final _response = await _dio.request( - _path, - data: _bodyData, - options: _options, - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - return _response; - } - - /// Creates list of users with given input array - /// - /// - /// Parameters: - /// * [user] - List of user object - /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation - /// * [headers] - Can be used to add additional headers to the request - /// * [extras] - Can be used to add flags to the request - /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response - /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress - /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress - /// - /// Returns a [Future] - /// Throws [DioError] if API call or serialization fails - Future> createUsersWithListInput({ - required BuiltList user, - CancelToken? cancelToken, - Map? headers, - Map? extra, - ValidateStatus? validateStatus, - ProgressCallback? onSendProgress, - ProgressCallback? onReceiveProgress, - }) async { - final _path = r'/user/createWithList'; - final _options = Options( - method: r'POST', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - contentType: 'application/json', - validateStatus: validateStatus, - ); - - dynamic _bodyData; - - try { - const _type = FullType(BuiltList, [FullType(User)]); - _bodyData = _serializers.serialize(user, specifiedType: _type); - - } catch(error, stackTrace) { - throw DioError( - requestOptions: _options.compose( - _dio.options, - _path, - ), - type: DioErrorType.other, - error: error, - )..stackTrace = stackTrace; - } - - final _response = await _dio.request( - _path, - data: _bodyData, - options: _options, - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - return _response; - } - - /// Delete user - /// This can only be done by the logged in user. - /// - /// Parameters: - /// * [username] - The name that needs to be deleted - /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation - /// * [headers] - Can be used to add additional headers to the request - /// * [extras] - Can be used to add flags to the request - /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response - /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress - /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress - /// - /// Returns a [Future] - /// Throws [DioError] if API call or serialization fails - Future> deleteUser({ - required String username, - CancelToken? cancelToken, - Map? headers, - Map? extra, - ValidateStatus? validateStatus, - ProgressCallback? onSendProgress, - ProgressCallback? onReceiveProgress, - }) async { - final _path = r'/user/{username}'.replaceAll('{' r'username' '}', username.toString()); - final _options = Options( - method: r'DELETE', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - ); - - final _response = await _dio.request( - _path, - options: _options, - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - return _response; - } - - /// Get user by user name - /// - /// - /// Parameters: - /// * [username] - The name that needs to be fetched. Use user1 for testing. - /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation - /// * [headers] - Can be used to add additional headers to the request - /// * [extras] - Can be used to add flags to the request - /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response - /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress - /// * [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 - Future> getUserByName({ - required String username, - CancelToken? cancelToken, - Map? headers, - Map? extra, - ValidateStatus? validateStatus, - ProgressCallback? onSendProgress, - ProgressCallback? onReceiveProgress, - }) async { - final _path = r'/user/{username}'.replaceAll('{' r'username' '}', username.toString()); - final _options = Options( - method: r'GET', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - ); - - final _response = await _dio.request( - _path, - options: _options, - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - User _responseData; - - try { - const _responseType = FullType(User); - _responseData = _serializers.deserialize( - _response.data!, - specifiedType: _responseType, - ) as User; - - } catch (error, stackTrace) { - throw DioError( - requestOptions: _response.requestOptions, - response: _response, - type: DioErrorType.other, - error: error, - )..stackTrace = stackTrace; - } - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - requestOptions: _response.requestOptions, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// Logs user into the system - /// - /// - /// Parameters: - /// * [username] - The user name for login - /// * [password] - The password for login in clear text - /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation - /// * [headers] - Can be used to add additional headers to the request - /// * [extras] - Can be used to add flags to the request - /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response - /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress - /// * [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 - Future> loginUser({ - required String username, - required String password, - CancelToken? cancelToken, - Map? headers, - Map? extra, - ValidateStatus? validateStatus, - ProgressCallback? onSendProgress, - ProgressCallback? onReceiveProgress, - }) async { - final _path = r'/user/login'; - final _options = Options( - method: r'GET', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - ); - - final _queryParameters = { - r'username': encodeQueryParameter(_serializers, username, const FullType(String)), - r'password': encodeQueryParameter(_serializers, password, const FullType(String)), - }; - - final _response = await _dio.request( - _path, - options: _options, - queryParameters: _queryParameters, - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - String _responseData; - - try { - _responseData = _response.data as String; - - } catch (error, stackTrace) { - throw DioError( - requestOptions: _response.requestOptions, - response: _response, - type: DioErrorType.other, - error: error, - )..stackTrace = stackTrace; - } - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - requestOptions: _response.requestOptions, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// Logs out current logged in user session - /// - /// - /// Parameters: - /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation - /// * [headers] - Can be used to add additional headers to the request - /// * [extras] - Can be used to add flags to the request - /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response - /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress - /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress - /// - /// Returns a [Future] - /// Throws [DioError] if API call or serialization fails - Future> logoutUser({ - CancelToken? cancelToken, - Map? headers, - Map? extra, - ValidateStatus? validateStatus, - ProgressCallback? onSendProgress, - ProgressCallback? onReceiveProgress, - }) async { - final _path = r'/user/logout'; - final _options = Options( - method: r'GET', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - ); - - final _response = await _dio.request( - _path, - options: _options, - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - return _response; - } - - /// Updated user - /// This can only be done by the logged in user. - /// - /// Parameters: - /// * [username] - name that need to be deleted - /// * [user] - Updated user object - /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation - /// * [headers] - Can be used to add additional headers to the request - /// * [extras] - Can be used to add flags to the request - /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response - /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress - /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress - /// - /// Returns a [Future] - /// Throws [DioError] if API call or serialization fails - Future> updateUser({ - required String username, - required User user, - CancelToken? cancelToken, - Map? headers, - Map? extra, - ValidateStatus? validateStatus, - ProgressCallback? onSendProgress, - ProgressCallback? onReceiveProgress, - }) async { - final _path = r'/user/{username}'.replaceAll('{' r'username' '}', username.toString()); - final _options = Options( - method: r'PUT', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - contentType: 'application/json', - validateStatus: validateStatus, - ); - - dynamic _bodyData; - - try { - const _type = FullType(User); - _bodyData = _serializers.serialize(user, specifiedType: _type); - - } catch(error, stackTrace) { - throw DioError( - requestOptions: _options.compose( - _dio.options, - _path, - ), - type: DioErrorType.other, - error: error, - )..stackTrace = stackTrace; - } - - final _response = await _dio.request( - _path, - data: _bodyData, - options: _options, - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - return _response; - } - -} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/api_util.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/api_util.dart deleted file mode 100644 index 5841689c379..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/api_util.dart +++ /dev/null @@ -1,78 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -import 'dart:convert'; -import 'dart:typed_data'; - -import 'package:built_collection/built_collection.dart'; -import 'package:built_value/serializer.dart'; -import 'package:dio_http/dio_http.dart'; -import 'package:dio_http/src/parameter.dart'; - -/// Format the given form parameter object into something that Dio can handle. -/// Returns primitive or String. -/// Returns List/Map if the value is BuildList/BuiltMap. -dynamic encodeFormParameter(Serializers serializers, dynamic value, FullType type) { - if (value == null) { - return ''; - } - if (value is String || value is num || value is bool) { - return value; - } - final serialized = serializers.serialize( - value as Object, - specifiedType: type, - ); - if (serialized is String) { - return serialized; - } - if (value is BuiltList || value is BuiltSet || value is BuiltMap) { - return serialized; - } - return json.encode(serialized); -} - -dynamic encodeQueryParameter( - Serializers serializers, - dynamic value, - FullType type, -) { - if (value == null) { - return ''; - } - if (value is String || value is num || value is bool) { - return value; - } - if (value is Uint8List) { - // Currently not sure how to serialize this - return value; - } - final serialized = serializers.serialize( - value as Object, - specifiedType: type, - ); - if (serialized == null) { - return ''; - } - if (serialized is String) { - return serialized; - } - return serialized; -} - -ListParam encodeCollectionQueryParameter( - Serializers serializers, - dynamic value, - FullType type, { - ListFormat format = ListFormat.multi, -}) { - final serialized = serializers.serialize( - value as Object, - specifiedType: type, - ); - if (value is BuiltList || value is BuiltSet) { - return ListParam(List.of((serialized as Iterable).cast()), format); - } - throw ArgumentError('Invalid value passed to encodeCollectionQueryParameter'); -} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/auth/api_key_auth.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/auth/api_key_auth.dart deleted file mode 100644 index ba24d7a2bc8..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/auth/api_key_auth.dart +++ /dev/null @@ -1,30 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - - -import 'package:dio_http/dio_http.dart'; -import 'package:openapi/src/auth/auth.dart'; - -class ApiKeyAuthInterceptor extends AuthInterceptor { - final Map apiKeys = {}; - - @override - void onRequest(RequestOptions options, RequestInterceptorHandler handler) { - final authInfo = getAuthInfo(options, (secure) => secure['type'] == 'apiKey'); - for (final info in authInfo) { - final authName = info['name'] as String; - final authKeyName = info['keyName'] as String; - final authWhere = info['where'] as String; - final apiKey = apiKeys[authName]; - if (apiKey != null) { - if (authWhere == 'query') { - options.queryParameters[authKeyName] = apiKey; - } else { - options.headers[authKeyName] = apiKey; - } - } - } - super.onRequest(options, handler); - } -} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/auth/auth.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/auth/auth.dart deleted file mode 100644 index e6dd5c4f6f8..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/auth/auth.dart +++ /dev/null @@ -1,18 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -import 'package:dio_http/dio_http.dart'; - -abstract class AuthInterceptor extends Interceptor { - /// Get auth information on given route for the given type. - /// Can return an empty list if type is not present on auth data or - /// if route doesn't need authentication. - List> getAuthInfo(RequestOptions route, bool Function(Map secure) handles) { - if (route.extra.containsKey('secure')) { - final auth = route.extra['secure'] as List>; - return auth.where((secure) => handles(secure)).toList(); - } - return []; - } -} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/auth/basic_auth.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/auth/basic_auth.dart deleted file mode 100644 index 18ba52cefc3..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/auth/basic_auth.dart +++ /dev/null @@ -1,37 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -import 'dart:convert'; - -import 'package:dio_http/dio_http.dart'; -import 'package:openapi/src/auth/auth.dart'; - -class BasicAuthInfo { - final String username; - final String password; - - const BasicAuthInfo(this.username, this.password); -} - -class BasicAuthInterceptor extends AuthInterceptor { - final Map authInfo = {}; - - @override - void onRequest( - RequestOptions options, - RequestInterceptorHandler handler, - ) { - final metadataAuthInfo = getAuthInfo(options, (secure) => (secure['type'] == 'http' && secure['scheme'] == 'basic') || secure['type'] == 'basic'); - for (final info in metadataAuthInfo) { - final authName = info['name'] as String; - final basicAuthInfo = authInfo[authName]; - if (basicAuthInfo != null) { - final basicAuth = 'Basic ${base64Encode(utf8.encode('${basicAuthInfo.username}:${basicAuthInfo.password}'))}'; - options.headers['Authorization'] = basicAuth; - break; - } - } - super.onRequest(options, handler); - } -} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/auth/bearer_auth.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/auth/bearer_auth.dart deleted file mode 100644 index daa81713008..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/auth/bearer_auth.dart +++ /dev/null @@ -1,26 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -import 'package:dio_http/dio_http.dart'; -import 'package:openapi/src/auth/auth.dart'; - -class BearerAuthInterceptor extends AuthInterceptor { - final Map tokens = {}; - - @override - void onRequest( - RequestOptions options, - RequestInterceptorHandler handler, - ) { - final authInfo = getAuthInfo(options, (secure) => secure['type'] == 'http' && secure['scheme'] == 'bearer'); - for (final info in authInfo) { - final token = tokens[info['name']]; - if (token != null) { - options.headers['Authorization'] = 'Bearer ${token}'; - break; - } - } - super.onRequest(options, handler); - } -} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/auth/oauth.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/auth/oauth.dart deleted file mode 100644 index 82140409b32..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/auth/oauth.dart +++ /dev/null @@ -1,26 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -import 'package:dio_http/dio_http.dart'; -import 'package:openapi/src/auth/auth.dart'; - -class OAuthInterceptor extends AuthInterceptor { - final Map tokens = {}; - - @override - void onRequest( - RequestOptions options, - RequestInterceptorHandler handler, - ) { - final authInfo = getAuthInfo(options, (secure) => secure['type'] == 'oauth' || secure['type'] == 'oauth2'); - for (final info in authInfo) { - final token = tokens[info['name']]; - if (token != null) { - options.headers['Authorization'] = 'Bearer ${token}'; - break; - } - } - super.onRequest(options, handler); - } -} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/date_serializer.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/date_serializer.dart deleted file mode 100644 index db3c5c437db..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/date_serializer.dart +++ /dev/null @@ -1,31 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -import 'package:built_collection/built_collection.dart'; -import 'package:built_value/serializer.dart'; -import 'package:openapi/src/model/date.dart'; - -class DateSerializer implements PrimitiveSerializer { - - const DateSerializer(); - - @override - Iterable get types => BuiltList.of([Date]); - - @override - String get wireName => 'Date'; - - @override - Date deserialize(Serializers serializers, Object serialized, - {FullType specifiedType = FullType.unspecified}) { - final parsed = DateTime.parse(serialized as String); - return Date(parsed.year, parsed.month, parsed.day); - } - - @override - Object serialize(Serializers serializers, Date date, - {FullType specifiedType = FullType.unspecified}) { - return date.toString(); - } -} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/additional_properties_class.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/additional_properties_class.dart deleted file mode 100644 index 4d45be3abbf..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/additional_properties_class.dart +++ /dev/null @@ -1,87 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -import 'package:built_collection/built_collection.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'additional_properties_class.g.dart'; - -/// AdditionalPropertiesClass -/// -/// Properties: -/// * [mapProperty] -/// * [mapOfMapProperty] -abstract class AdditionalPropertiesClass implements Built { - @BuiltValueField(wireName: r'map_property') - BuiltMap? get mapProperty; - - @BuiltValueField(wireName: r'map_of_map_property') - BuiltMap>? get mapOfMapProperty; - - AdditionalPropertiesClass._(); - - @BuiltValueHook(initializeBuilder: true) - static void _defaults(AdditionalPropertiesClassBuilder b) => b; - - factory AdditionalPropertiesClass([void updates(AdditionalPropertiesClassBuilder b)]) = _$AdditionalPropertiesClass; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$AdditionalPropertiesClassSerializer(); -} - -class _$AdditionalPropertiesClassSerializer implements StructuredSerializer { - @override - final Iterable types = const [AdditionalPropertiesClass, _$AdditionalPropertiesClass]; - - @override - final String wireName = r'AdditionalPropertiesClass'; - - @override - Iterable serialize(Serializers serializers, AdditionalPropertiesClass object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.mapProperty != null) { - result - ..add(r'map_property') - ..add(serializers.serialize(object.mapProperty, - specifiedType: const FullType(BuiltMap, [FullType(String), FullType(String)]))); - } - if (object.mapOfMapProperty != null) { - result - ..add(r'map_of_map_property') - ..add(serializers.serialize(object.mapOfMapProperty, - specifiedType: const FullType(BuiltMap, [FullType(String), FullType(BuiltMap, [FullType(String), FullType(String)])]))); - } - return result; - } - - @override - AdditionalPropertiesClass deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = AdditionalPropertiesClassBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final Object? value = iterator.current; - - switch (key) { - case r'map_property': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(BuiltMap, [FullType(String), FullType(String)])) as BuiltMap; - result.mapProperty.replace(valueDes); - break; - case r'map_of_map_property': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(BuiltMap, [FullType(String), FullType(BuiltMap, [FullType(String), FullType(String)])])) as BuiltMap>; - result.mapOfMapProperty.replace(valueDes); - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/animal.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/animal.dart deleted file mode 100644 index cd9084ceb28..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/animal.dart +++ /dev/null @@ -1,85 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'animal.g.dart'; - -/// Animal -/// -/// Properties: -/// * [className] -/// * [color] -abstract class Animal implements Built { - @BuiltValueField(wireName: r'className') - String get className; - - @BuiltValueField(wireName: r'color') - String? get color; - - Animal._(); - - @BuiltValueHook(initializeBuilder: true) - static void _defaults(AnimalBuilder b) => b - ..color = 'red'; - - factory Animal([void updates(AnimalBuilder b)]) = _$Animal; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$AnimalSerializer(); -} - -class _$AnimalSerializer implements StructuredSerializer { - @override - final Iterable types = const [Animal, _$Animal]; - - @override - final String wireName = r'Animal'; - - @override - Iterable serialize(Serializers serializers, Animal object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - result - ..add(r'className') - ..add(serializers.serialize(object.className, - specifiedType: const FullType(String))); - if (object.color != null) { - result - ..add(r'color') - ..add(serializers.serialize(object.color, - specifiedType: const FullType(String))); - } - return result; - } - - @override - Animal deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = AnimalBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final Object? value = iterator.current; - - switch (key) { - case r'className': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - result.className = valueDes; - break; - case r'color': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - result.color = valueDes; - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/api_response.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/api_response.dart deleted file mode 100644 index c2ebff7ffea..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/api_response.dart +++ /dev/null @@ -1,101 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'api_response.g.dart'; - -/// ApiResponse -/// -/// Properties: -/// * [code] -/// * [type] -/// * [message] -abstract class ApiResponse implements Built { - @BuiltValueField(wireName: r'code') - int? get code; - - @BuiltValueField(wireName: r'type') - String? get type; - - @BuiltValueField(wireName: r'message') - String? get message; - - ApiResponse._(); - - @BuiltValueHook(initializeBuilder: true) - static void _defaults(ApiResponseBuilder b) => b; - - factory ApiResponse([void updates(ApiResponseBuilder b)]) = _$ApiResponse; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$ApiResponseSerializer(); -} - -class _$ApiResponseSerializer implements StructuredSerializer { - @override - final Iterable types = const [ApiResponse, _$ApiResponse]; - - @override - final String wireName = r'ApiResponse'; - - @override - Iterable serialize(Serializers serializers, ApiResponse object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.code != null) { - result - ..add(r'code') - ..add(serializers.serialize(object.code, - specifiedType: const FullType(int))); - } - if (object.type != null) { - result - ..add(r'type') - ..add(serializers.serialize(object.type, - specifiedType: const FullType(String))); - } - if (object.message != null) { - result - ..add(r'message') - ..add(serializers.serialize(object.message, - specifiedType: const FullType(String))); - } - return result; - } - - @override - ApiResponse deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = ApiResponseBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final Object? value = iterator.current; - - switch (key) { - case r'code': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; - result.code = valueDes; - break; - case r'type': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - result.type = valueDes; - break; - case r'message': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - result.message = valueDes; - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/array_of_array_of_number_only.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/array_of_array_of_number_only.dart deleted file mode 100644 index 1fa583bccc1..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/array_of_array_of_number_only.dart +++ /dev/null @@ -1,72 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -import 'package:built_collection/built_collection.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'array_of_array_of_number_only.g.dart'; - -/// ArrayOfArrayOfNumberOnly -/// -/// Properties: -/// * [arrayArrayNumber] -abstract class ArrayOfArrayOfNumberOnly implements Built { - @BuiltValueField(wireName: r'ArrayArrayNumber') - BuiltList>? get arrayArrayNumber; - - ArrayOfArrayOfNumberOnly._(); - - @BuiltValueHook(initializeBuilder: true) - static void _defaults(ArrayOfArrayOfNumberOnlyBuilder b) => b; - - factory ArrayOfArrayOfNumberOnly([void updates(ArrayOfArrayOfNumberOnlyBuilder b)]) = _$ArrayOfArrayOfNumberOnly; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$ArrayOfArrayOfNumberOnlySerializer(); -} - -class _$ArrayOfArrayOfNumberOnlySerializer implements StructuredSerializer { - @override - final Iterable types = const [ArrayOfArrayOfNumberOnly, _$ArrayOfArrayOfNumberOnly]; - - @override - final String wireName = r'ArrayOfArrayOfNumberOnly'; - - @override - Iterable serialize(Serializers serializers, ArrayOfArrayOfNumberOnly object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.arrayArrayNumber != null) { - result - ..add(r'ArrayArrayNumber') - ..add(serializers.serialize(object.arrayArrayNumber, - specifiedType: const FullType(BuiltList, [FullType(BuiltList, [FullType(num)])]))); - } - return result; - } - - @override - ArrayOfArrayOfNumberOnly deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = ArrayOfArrayOfNumberOnlyBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final Object? value = iterator.current; - - switch (key) { - case r'ArrayArrayNumber': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(BuiltList, [FullType(num)])])) as BuiltList>; - result.arrayArrayNumber.replace(valueDes); - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/array_of_number_only.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/array_of_number_only.dart deleted file mode 100644 index fcbd7d393be..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/array_of_number_only.dart +++ /dev/null @@ -1,72 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -import 'package:built_collection/built_collection.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'array_of_number_only.g.dart'; - -/// ArrayOfNumberOnly -/// -/// Properties: -/// * [arrayNumber] -abstract class ArrayOfNumberOnly implements Built { - @BuiltValueField(wireName: r'ArrayNumber') - BuiltList? get arrayNumber; - - ArrayOfNumberOnly._(); - - @BuiltValueHook(initializeBuilder: true) - static void _defaults(ArrayOfNumberOnlyBuilder b) => b; - - factory ArrayOfNumberOnly([void updates(ArrayOfNumberOnlyBuilder b)]) = _$ArrayOfNumberOnly; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$ArrayOfNumberOnlySerializer(); -} - -class _$ArrayOfNumberOnlySerializer implements StructuredSerializer { - @override - final Iterable types = const [ArrayOfNumberOnly, _$ArrayOfNumberOnly]; - - @override - final String wireName = r'ArrayOfNumberOnly'; - - @override - Iterable serialize(Serializers serializers, ArrayOfNumberOnly object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.arrayNumber != null) { - result - ..add(r'ArrayNumber') - ..add(serializers.serialize(object.arrayNumber, - specifiedType: const FullType(BuiltList, [FullType(num)]))); - } - return result; - } - - @override - ArrayOfNumberOnly deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = ArrayOfNumberOnlyBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final Object? value = iterator.current; - - switch (key) { - case r'ArrayNumber': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(num)])) as BuiltList; - result.arrayNumber.replace(valueDes); - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/array_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/array_test.dart deleted file mode 100644 index 8025d141c12..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/array_test.dart +++ /dev/null @@ -1,103 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -import 'package:built_collection/built_collection.dart'; -import 'package:openapi/src/model/read_only_first.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'array_test.g.dart'; - -/// ArrayTest -/// -/// Properties: -/// * [arrayOfString] -/// * [arrayArrayOfInteger] -/// * [arrayArrayOfModel] -abstract class ArrayTest implements Built { - @BuiltValueField(wireName: r'array_of_string') - BuiltList? get arrayOfString; - - @BuiltValueField(wireName: r'array_array_of_integer') - BuiltList>? get arrayArrayOfInteger; - - @BuiltValueField(wireName: r'array_array_of_model') - BuiltList>? get arrayArrayOfModel; - - ArrayTest._(); - - @BuiltValueHook(initializeBuilder: true) - static void _defaults(ArrayTestBuilder b) => b; - - factory ArrayTest([void updates(ArrayTestBuilder b)]) = _$ArrayTest; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$ArrayTestSerializer(); -} - -class _$ArrayTestSerializer implements StructuredSerializer { - @override - final Iterable types = const [ArrayTest, _$ArrayTest]; - - @override - final String wireName = r'ArrayTest'; - - @override - Iterable serialize(Serializers serializers, ArrayTest object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.arrayOfString != null) { - result - ..add(r'array_of_string') - ..add(serializers.serialize(object.arrayOfString, - specifiedType: const FullType(BuiltList, [FullType(String)]))); - } - if (object.arrayArrayOfInteger != null) { - result - ..add(r'array_array_of_integer') - ..add(serializers.serialize(object.arrayArrayOfInteger, - specifiedType: const FullType(BuiltList, [FullType(BuiltList, [FullType(int)])]))); - } - if (object.arrayArrayOfModel != null) { - result - ..add(r'array_array_of_model') - ..add(serializers.serialize(object.arrayArrayOfModel, - specifiedType: const FullType(BuiltList, [FullType(BuiltList, [FullType(ReadOnlyFirst)])]))); - } - return result; - } - - @override - ArrayTest deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = ArrayTestBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final Object? value = iterator.current; - - switch (key) { - case r'array_of_string': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(String)])) as BuiltList; - result.arrayOfString.replace(valueDes); - break; - case r'array_array_of_integer': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(BuiltList, [FullType(int)])])) as BuiltList>; - result.arrayArrayOfInteger.replace(valueDes); - break; - case r'array_array_of_model': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(BuiltList, [FullType(ReadOnlyFirst)])])) as BuiltList>; - result.arrayArrayOfModel.replace(valueDes); - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/capitalization.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/capitalization.dart deleted file mode 100644 index 15a8f080e9b..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/capitalization.dart +++ /dev/null @@ -1,147 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'capitalization.g.dart'; - -/// Capitalization -/// -/// Properties: -/// * [smallCamel] -/// * [capitalCamel] -/// * [smallSnake] -/// * [capitalSnake] -/// * [sCAETHFlowPoints] -/// * [ATT_NAME] - Name of the pet -abstract class Capitalization implements Built { - @BuiltValueField(wireName: r'smallCamel') - String? get smallCamel; - - @BuiltValueField(wireName: r'CapitalCamel') - String? get capitalCamel; - - @BuiltValueField(wireName: r'small_Snake') - String? get smallSnake; - - @BuiltValueField(wireName: r'Capital_Snake') - String? get capitalSnake; - - @BuiltValueField(wireName: r'SCA_ETH_Flow_Points') - String? get sCAETHFlowPoints; - - /// Name of the pet - @BuiltValueField(wireName: r'ATT_NAME') - String? get ATT_NAME; - - Capitalization._(); - - @BuiltValueHook(initializeBuilder: true) - static void _defaults(CapitalizationBuilder b) => b; - - factory Capitalization([void updates(CapitalizationBuilder b)]) = _$Capitalization; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$CapitalizationSerializer(); -} - -class _$CapitalizationSerializer implements StructuredSerializer { - @override - final Iterable types = const [Capitalization, _$Capitalization]; - - @override - final String wireName = r'Capitalization'; - - @override - Iterable serialize(Serializers serializers, Capitalization object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.smallCamel != null) { - result - ..add(r'smallCamel') - ..add(serializers.serialize(object.smallCamel, - specifiedType: const FullType(String))); - } - if (object.capitalCamel != null) { - result - ..add(r'CapitalCamel') - ..add(serializers.serialize(object.capitalCamel, - specifiedType: const FullType(String))); - } - if (object.smallSnake != null) { - result - ..add(r'small_Snake') - ..add(serializers.serialize(object.smallSnake, - specifiedType: const FullType(String))); - } - if (object.capitalSnake != null) { - result - ..add(r'Capital_Snake') - ..add(serializers.serialize(object.capitalSnake, - specifiedType: const FullType(String))); - } - if (object.sCAETHFlowPoints != null) { - result - ..add(r'SCA_ETH_Flow_Points') - ..add(serializers.serialize(object.sCAETHFlowPoints, - specifiedType: const FullType(String))); - } - if (object.ATT_NAME != null) { - result - ..add(r'ATT_NAME') - ..add(serializers.serialize(object.ATT_NAME, - specifiedType: const FullType(String))); - } - return result; - } - - @override - Capitalization deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = CapitalizationBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final Object? value = iterator.current; - - switch (key) { - case r'smallCamel': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - result.smallCamel = valueDes; - break; - case r'CapitalCamel': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - result.capitalCamel = valueDes; - break; - case r'small_Snake': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - result.smallSnake = valueDes; - break; - case r'Capital_Snake': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - result.capitalSnake = valueDes; - break; - case r'SCA_ETH_Flow_Points': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - result.sCAETHFlowPoints = valueDes; - break; - case r'ATT_NAME': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - result.ATT_NAME = valueDes; - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/cat.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/cat.dart deleted file mode 100644 index 2c905783610..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/cat.dart +++ /dev/null @@ -1,104 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -import 'package:openapi/src/model/animal.dart'; -import 'package:openapi/src/model/cat_all_of.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'cat.g.dart'; - -// ignore_for_file: unused_import - -/// Cat -/// -/// Properties: -/// * [className] -/// * [color] -/// * [declawed] -abstract class Cat implements Built { - @BuiltValueField(wireName: r'className') - String get className; - - @BuiltValueField(wireName: r'color') - String? get color; - - @BuiltValueField(wireName: r'declawed') - bool? get declawed; - - Cat._(); - - @BuiltValueHook(initializeBuilder: true) - static void _defaults(CatBuilder b) => b - ..color = 'red'; - - factory Cat([void updates(CatBuilder b)]) = _$Cat; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$CatSerializer(); -} - -class _$CatSerializer implements StructuredSerializer { - @override - final Iterable types = const [Cat, _$Cat]; - - @override - final String wireName = r'Cat'; - - @override - Iterable serialize(Serializers serializers, Cat object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - result - ..add(r'className') - ..add(serializers.serialize(object.className, - specifiedType: const FullType(String))); - if (object.color != null) { - result - ..add(r'color') - ..add(serializers.serialize(object.color, - specifiedType: const FullType(String))); - } - if (object.declawed != null) { - result - ..add(r'declawed') - ..add(serializers.serialize(object.declawed, - specifiedType: const FullType(bool))); - } - return result; - } - - @override - Cat deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = CatBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final Object? value = iterator.current; - - switch (key) { - case r'className': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - result.className = valueDes; - break; - case r'color': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - result.color = valueDes; - break; - case r'declawed': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(bool)) as bool; - result.declawed = valueDes; - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/cat_all_of.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/cat_all_of.dart deleted file mode 100644 index 1734098fe22..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/cat_all_of.dart +++ /dev/null @@ -1,71 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'cat_all_of.g.dart'; - -/// CatAllOf -/// -/// Properties: -/// * [declawed] -abstract class CatAllOf implements Built { - @BuiltValueField(wireName: r'declawed') - bool? get declawed; - - CatAllOf._(); - - @BuiltValueHook(initializeBuilder: true) - static void _defaults(CatAllOfBuilder b) => b; - - factory CatAllOf([void updates(CatAllOfBuilder b)]) = _$CatAllOf; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$CatAllOfSerializer(); -} - -class _$CatAllOfSerializer implements StructuredSerializer { - @override - final Iterable types = const [CatAllOf, _$CatAllOf]; - - @override - final String wireName = r'CatAllOf'; - - @override - Iterable serialize(Serializers serializers, CatAllOf object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.declawed != null) { - result - ..add(r'declawed') - ..add(serializers.serialize(object.declawed, - specifiedType: const FullType(bool))); - } - return result; - } - - @override - CatAllOf deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = CatAllOfBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final Object? value = iterator.current; - - switch (key) { - case r'declawed': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(bool)) as bool; - result.declawed = valueDes; - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/category.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/category.dart deleted file mode 100644 index 9ee9a94a3e7..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/category.dart +++ /dev/null @@ -1,85 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'category.g.dart'; - -/// Category -/// -/// Properties: -/// * [id] -/// * [name] -abstract class Category implements Built { - @BuiltValueField(wireName: r'id') - int? get id; - - @BuiltValueField(wireName: r'name') - String get name; - - Category._(); - - @BuiltValueHook(initializeBuilder: true) - static void _defaults(CategoryBuilder b) => b - ..name = 'default-name'; - - factory Category([void updates(CategoryBuilder b)]) = _$Category; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$CategorySerializer(); -} - -class _$CategorySerializer implements StructuredSerializer { - @override - final Iterable types = const [Category, _$Category]; - - @override - final String wireName = r'Category'; - - @override - Iterable serialize(Serializers serializers, Category object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.id != null) { - result - ..add(r'id') - ..add(serializers.serialize(object.id, - specifiedType: const FullType(int))); - } - result - ..add(r'name') - ..add(serializers.serialize(object.name, - specifiedType: const FullType(String))); - return result; - } - - @override - Category deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = CategoryBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final Object? value = iterator.current; - - switch (key) { - case r'id': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; - result.id = valueDes; - break; - case r'name': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - result.name = valueDes; - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/class_model.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/class_model.dart deleted file mode 100644 index ca90835c83d..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/class_model.dart +++ /dev/null @@ -1,71 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'class_model.g.dart'; - -/// Model for testing model with \"_class\" property -/// -/// Properties: -/// * [class_] -abstract class ClassModel implements Built { - @BuiltValueField(wireName: r'_class') - String? get class_; - - ClassModel._(); - - @BuiltValueHook(initializeBuilder: true) - static void _defaults(ClassModelBuilder b) => b; - - factory ClassModel([void updates(ClassModelBuilder b)]) = _$ClassModel; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$ClassModelSerializer(); -} - -class _$ClassModelSerializer implements StructuredSerializer { - @override - final Iterable types = const [ClassModel, _$ClassModel]; - - @override - final String wireName = r'ClassModel'; - - @override - Iterable serialize(Serializers serializers, ClassModel object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.class_ != null) { - result - ..add(r'_class') - ..add(serializers.serialize(object.class_, - specifiedType: const FullType(String))); - } - return result; - } - - @override - ClassModel deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = ClassModelBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final Object? value = iterator.current; - - switch (key) { - case r'_class': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - result.class_ = valueDes; - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/date.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/date.dart deleted file mode 100644 index b21c7f544be..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/date.dart +++ /dev/null @@ -1,70 +0,0 @@ -/// A gregorian calendar date generated by -/// OpenAPI generator to differentiate -/// between [DateTime] and [Date] formats. -class Date implements Comparable { - final int year; - - /// January is 1. - final int month; - - /// First day is 1. - final int day; - - Date(this.year, this.month, this.day); - - /// The current date - static Date now({bool utc = false}) { - var now = DateTime.now(); - if (utc) { - now = now.toUtc(); - } - return now.toDate(); - } - - /// Convert to a [DateTime]. - DateTime toDateTime({bool utc = false}) { - if (utc) { - return DateTime.utc(year, month, day); - } else { - return DateTime(year, month, day); - } - } - - @override - int compareTo(Date other) { - int d = year.compareTo(other.year); - if (d != 0) { - return d; - } - d = month.compareTo(other.month); - if (d != 0) { - return d; - } - return day.compareTo(other.day); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is Date && - runtimeType == other.runtimeType && - year == other.year && - month == other.month && - day == other.day; - - @override - int get hashCode => year.hashCode ^ month.hashCode ^ day.hashCode; - - @override - String toString() { - final yyyy = year.toString(); - final mm = month.toString().padLeft(2, '0'); - final dd = day.toString().padLeft(2, '0'); - - return '$yyyy-$mm-$dd'; - } -} - -extension DateTimeToDate on DateTime { - Date toDate() => Date(year, month, day); -} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/deprecated_object.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/deprecated_object.dart deleted file mode 100644 index 98db39b4f44..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/deprecated_object.dart +++ /dev/null @@ -1,71 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'deprecated_object.g.dart'; - -/// DeprecatedObject -/// -/// Properties: -/// * [name] -abstract class DeprecatedObject implements Built { - @BuiltValueField(wireName: r'name') - String? get name; - - DeprecatedObject._(); - - @BuiltValueHook(initializeBuilder: true) - static void _defaults(DeprecatedObjectBuilder b) => b; - - factory DeprecatedObject([void updates(DeprecatedObjectBuilder b)]) = _$DeprecatedObject; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$DeprecatedObjectSerializer(); -} - -class _$DeprecatedObjectSerializer implements StructuredSerializer { - @override - final Iterable types = const [DeprecatedObject, _$DeprecatedObject]; - - @override - final String wireName = r'DeprecatedObject'; - - @override - Iterable serialize(Serializers serializers, DeprecatedObject object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.name != null) { - result - ..add(r'name') - ..add(serializers.serialize(object.name, - specifiedType: const FullType(String))); - } - return result; - } - - @override - DeprecatedObject deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = DeprecatedObjectBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final Object? value = iterator.current; - - switch (key) { - case r'name': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - result.name = valueDes; - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/dog.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/dog.dart deleted file mode 100644 index 9e36ec77bd8..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/dog.dart +++ /dev/null @@ -1,104 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -import 'package:openapi/src/model/dog_all_of.dart'; -import 'package:openapi/src/model/animal.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'dog.g.dart'; - -// ignore_for_file: unused_import - -/// Dog -/// -/// Properties: -/// * [className] -/// * [color] -/// * [breed] -abstract class Dog implements Built { - @BuiltValueField(wireName: r'className') - String get className; - - @BuiltValueField(wireName: r'color') - String? get color; - - @BuiltValueField(wireName: r'breed') - String? get breed; - - Dog._(); - - @BuiltValueHook(initializeBuilder: true) - static void _defaults(DogBuilder b) => b - ..color = 'red'; - - factory Dog([void updates(DogBuilder b)]) = _$Dog; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$DogSerializer(); -} - -class _$DogSerializer implements StructuredSerializer { - @override - final Iterable types = const [Dog, _$Dog]; - - @override - final String wireName = r'Dog'; - - @override - Iterable serialize(Serializers serializers, Dog object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - result - ..add(r'className') - ..add(serializers.serialize(object.className, - specifiedType: const FullType(String))); - if (object.color != null) { - result - ..add(r'color') - ..add(serializers.serialize(object.color, - specifiedType: const FullType(String))); - } - if (object.breed != null) { - result - ..add(r'breed') - ..add(serializers.serialize(object.breed, - specifiedType: const FullType(String))); - } - return result; - } - - @override - Dog deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = DogBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final Object? value = iterator.current; - - switch (key) { - case r'className': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - result.className = valueDes; - break; - case r'color': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - result.color = valueDes; - break; - case r'breed': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - result.breed = valueDes; - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/dog_all_of.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/dog_all_of.dart deleted file mode 100644 index 23387e4da75..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/dog_all_of.dart +++ /dev/null @@ -1,71 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'dog_all_of.g.dart'; - -/// DogAllOf -/// -/// Properties: -/// * [breed] -abstract class DogAllOf implements Built { - @BuiltValueField(wireName: r'breed') - String? get breed; - - DogAllOf._(); - - @BuiltValueHook(initializeBuilder: true) - static void _defaults(DogAllOfBuilder b) => b; - - factory DogAllOf([void updates(DogAllOfBuilder b)]) = _$DogAllOf; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$DogAllOfSerializer(); -} - -class _$DogAllOfSerializer implements StructuredSerializer { - @override - final Iterable types = const [DogAllOf, _$DogAllOf]; - - @override - final String wireName = r'DogAllOf'; - - @override - Iterable serialize(Serializers serializers, DogAllOf object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.breed != null) { - result - ..add(r'breed') - ..add(serializers.serialize(object.breed, - specifiedType: const FullType(String))); - } - return result; - } - - @override - DogAllOf deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = DogAllOfBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final Object? value = iterator.current; - - switch (key) { - case r'breed': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - result.breed = valueDes; - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/enum_arrays.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/enum_arrays.dart deleted file mode 100644 index bda9790c104..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/enum_arrays.dart +++ /dev/null @@ -1,119 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -import 'package:built_collection/built_collection.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'enum_arrays.g.dart'; - -/// EnumArrays -/// -/// Properties: -/// * [justSymbol] -/// * [arrayEnum] -abstract class EnumArrays implements Built { - @BuiltValueField(wireName: r'just_symbol') - EnumArraysJustSymbolEnum? get justSymbol; - // enum justSymbolEnum { >=, $, }; - - @BuiltValueField(wireName: r'array_enum') - BuiltList? get arrayEnum; - // enum arrayEnumEnum { fish, crab, }; - - EnumArrays._(); - - @BuiltValueHook(initializeBuilder: true) - static void _defaults(EnumArraysBuilder b) => b; - - factory EnumArrays([void updates(EnumArraysBuilder b)]) = _$EnumArrays; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$EnumArraysSerializer(); -} - -class _$EnumArraysSerializer implements StructuredSerializer { - @override - final Iterable types = const [EnumArrays, _$EnumArrays]; - - @override - final String wireName = r'EnumArrays'; - - @override - Iterable serialize(Serializers serializers, EnumArrays object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.justSymbol != null) { - result - ..add(r'just_symbol') - ..add(serializers.serialize(object.justSymbol, - specifiedType: const FullType(EnumArraysJustSymbolEnum))); - } - if (object.arrayEnum != null) { - result - ..add(r'array_enum') - ..add(serializers.serialize(object.arrayEnum, - specifiedType: const FullType(BuiltList, [FullType(EnumArraysArrayEnumEnum)]))); - } - return result; - } - - @override - EnumArrays deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = EnumArraysBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final Object? value = iterator.current; - - switch (key) { - case r'just_symbol': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(EnumArraysJustSymbolEnum)) as EnumArraysJustSymbolEnum; - result.justSymbol = valueDes; - break; - case r'array_enum': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(EnumArraysArrayEnumEnum)])) as BuiltList; - result.arrayEnum.replace(valueDes); - break; - } - } - return result.build(); - } -} - -class EnumArraysJustSymbolEnum extends EnumClass { - - @BuiltValueEnumConst(wireName: r'>=') - static const EnumArraysJustSymbolEnum greaterThanEqual = _$enumArraysJustSymbolEnum_greaterThanEqual; - @BuiltValueEnumConst(wireName: r'$') - static const EnumArraysJustSymbolEnum dollar = _$enumArraysJustSymbolEnum_dollar; - - static Serializer get serializer => _$enumArraysJustSymbolEnumSerializer; - - const EnumArraysJustSymbolEnum._(String name): super(name); - - static BuiltSet get values => _$enumArraysJustSymbolEnumValues; - static EnumArraysJustSymbolEnum valueOf(String name) => _$enumArraysJustSymbolEnumValueOf(name); -} - -class EnumArraysArrayEnumEnum extends EnumClass { - - @BuiltValueEnumConst(wireName: r'fish') - static const EnumArraysArrayEnumEnum fish = _$enumArraysArrayEnumEnum_fish; - @BuiltValueEnumConst(wireName: r'crab') - static const EnumArraysArrayEnumEnum crab = _$enumArraysArrayEnumEnum_crab; - - static Serializer get serializer => _$enumArraysArrayEnumEnumSerializer; - - const EnumArraysArrayEnumEnum._(String name): super(name); - - static BuiltSet get values => _$enumArraysArrayEnumEnumValues; - static EnumArraysArrayEnumEnum valueOf(String name) => _$enumArraysArrayEnumEnumValueOf(name); -} - diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/enum_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/enum_test.dart deleted file mode 100644 index 7ca76d22fe0..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/enum_test.dart +++ /dev/null @@ -1,252 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -import 'package:openapi/src/model/outer_enum.dart'; -import 'package:openapi/src/model/outer_enum_default_value.dart'; -import 'package:built_collection/built_collection.dart'; -import 'package:openapi/src/model/outer_enum_integer.dart'; -import 'package:openapi/src/model/outer_enum_integer_default_value.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'enum_test.g.dart'; - -/// EnumTest -/// -/// Properties: -/// * [enumString] -/// * [enumStringRequired] -/// * [enumInteger] -/// * [enumNumber] -/// * [outerEnum] -/// * [outerEnumInteger] -/// * [outerEnumDefaultValue] -/// * [outerEnumIntegerDefaultValue] -abstract class EnumTest implements Built { - @BuiltValueField(wireName: r'enum_string') - EnumTestEnumStringEnum? get enumString; - // enum enumStringEnum { UPPER, lower, , }; - - @BuiltValueField(wireName: r'enum_string_required') - EnumTestEnumStringRequiredEnum get enumStringRequired; - // enum enumStringRequiredEnum { UPPER, lower, , }; - - @BuiltValueField(wireName: r'enum_integer') - EnumTestEnumIntegerEnum? get enumInteger; - // enum enumIntegerEnum { 1, -1, }; - - @BuiltValueField(wireName: r'enum_number') - EnumTestEnumNumberEnum? get enumNumber; - // enum enumNumberEnum { 1.1, -1.2, }; - - @BuiltValueField(wireName: r'outerEnum') - OuterEnum? get outerEnum; - // enum outerEnumEnum { placed, approved, delivered, }; - - @BuiltValueField(wireName: r'outerEnumInteger') - OuterEnumInteger? get outerEnumInteger; - // enum outerEnumIntegerEnum { 0, 1, 2, }; - - @BuiltValueField(wireName: r'outerEnumDefaultValue') - OuterEnumDefaultValue? get outerEnumDefaultValue; - // enum outerEnumDefaultValueEnum { placed, approved, delivered, }; - - @BuiltValueField(wireName: r'outerEnumIntegerDefaultValue') - OuterEnumIntegerDefaultValue? get outerEnumIntegerDefaultValue; - // enum outerEnumIntegerDefaultValueEnum { 0, 1, 2, }; - - EnumTest._(); - - @BuiltValueHook(initializeBuilder: true) - static void _defaults(EnumTestBuilder b) => b; - - factory EnumTest([void updates(EnumTestBuilder b)]) = _$EnumTest; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$EnumTestSerializer(); -} - -class _$EnumTestSerializer implements StructuredSerializer { - @override - final Iterable types = const [EnumTest, _$EnumTest]; - - @override - final String wireName = r'EnumTest'; - - @override - Iterable serialize(Serializers serializers, EnumTest object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.enumString != null) { - result - ..add(r'enum_string') - ..add(serializers.serialize(object.enumString, - specifiedType: const FullType(EnumTestEnumStringEnum))); - } - result - ..add(r'enum_string_required') - ..add(serializers.serialize(object.enumStringRequired, - specifiedType: const FullType(EnumTestEnumStringRequiredEnum))); - if (object.enumInteger != null) { - result - ..add(r'enum_integer') - ..add(serializers.serialize(object.enumInteger, - specifiedType: const FullType(EnumTestEnumIntegerEnum))); - } - if (object.enumNumber != null) { - result - ..add(r'enum_number') - ..add(serializers.serialize(object.enumNumber, - specifiedType: const FullType(EnumTestEnumNumberEnum))); - } - if (object.outerEnum != null) { - result - ..add(r'outerEnum') - ..add(serializers.serialize(object.outerEnum, - specifiedType: const FullType.nullable(OuterEnum))); - } - if (object.outerEnumInteger != null) { - result - ..add(r'outerEnumInteger') - ..add(serializers.serialize(object.outerEnumInteger, - specifiedType: const FullType(OuterEnumInteger))); - } - if (object.outerEnumDefaultValue != null) { - result - ..add(r'outerEnumDefaultValue') - ..add(serializers.serialize(object.outerEnumDefaultValue, - specifiedType: const FullType(OuterEnumDefaultValue))); - } - if (object.outerEnumIntegerDefaultValue != null) { - result - ..add(r'outerEnumIntegerDefaultValue') - ..add(serializers.serialize(object.outerEnumIntegerDefaultValue, - specifiedType: const FullType(OuterEnumIntegerDefaultValue))); - } - return result; - } - - @override - EnumTest deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = EnumTestBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final Object? value = iterator.current; - - switch (key) { - case r'enum_string': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(EnumTestEnumStringEnum)) as EnumTestEnumStringEnum; - result.enumString = valueDes; - break; - case r'enum_string_required': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(EnumTestEnumStringRequiredEnum)) as EnumTestEnumStringRequiredEnum; - result.enumStringRequired = valueDes; - break; - case r'enum_integer': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(EnumTestEnumIntegerEnum)) as EnumTestEnumIntegerEnum; - result.enumInteger = valueDes; - break; - case r'enum_number': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(EnumTestEnumNumberEnum)) as EnumTestEnumNumberEnum; - result.enumNumber = valueDes; - break; - case r'outerEnum': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType.nullable(OuterEnum)) as OuterEnum?; - if (valueDes == null) continue; - result.outerEnum = valueDes; - break; - case r'outerEnumInteger': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(OuterEnumInteger)) as OuterEnumInteger; - result.outerEnumInteger = valueDes; - break; - case r'outerEnumDefaultValue': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(OuterEnumDefaultValue)) as OuterEnumDefaultValue; - result.outerEnumDefaultValue = valueDes; - break; - case r'outerEnumIntegerDefaultValue': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(OuterEnumIntegerDefaultValue)) as OuterEnumIntegerDefaultValue; - result.outerEnumIntegerDefaultValue = valueDes; - break; - } - } - return result.build(); - } -} - -class EnumTestEnumStringEnum extends EnumClass { - - @BuiltValueEnumConst(wireName: r'UPPER') - static const EnumTestEnumStringEnum UPPER = _$enumTestEnumStringEnum_UPPER; - @BuiltValueEnumConst(wireName: r'lower') - static const EnumTestEnumStringEnum lower = _$enumTestEnumStringEnum_lower; - @BuiltValueEnumConst(wireName: r'') - static const EnumTestEnumStringEnum empty = _$enumTestEnumStringEnum_empty; - - static Serializer get serializer => _$enumTestEnumStringEnumSerializer; - - const EnumTestEnumStringEnum._(String name): super(name); - - static BuiltSet get values => _$enumTestEnumStringEnumValues; - static EnumTestEnumStringEnum valueOf(String name) => _$enumTestEnumStringEnumValueOf(name); -} - -class EnumTestEnumStringRequiredEnum extends EnumClass { - - @BuiltValueEnumConst(wireName: r'UPPER') - static const EnumTestEnumStringRequiredEnum UPPER = _$enumTestEnumStringRequiredEnum_UPPER; - @BuiltValueEnumConst(wireName: r'lower') - static const EnumTestEnumStringRequiredEnum lower = _$enumTestEnumStringRequiredEnum_lower; - @BuiltValueEnumConst(wireName: r'') - static const EnumTestEnumStringRequiredEnum empty = _$enumTestEnumStringRequiredEnum_empty; - - static Serializer get serializer => _$enumTestEnumStringRequiredEnumSerializer; - - const EnumTestEnumStringRequiredEnum._(String name): super(name); - - static BuiltSet get values => _$enumTestEnumStringRequiredEnumValues; - static EnumTestEnumStringRequiredEnum valueOf(String name) => _$enumTestEnumStringRequiredEnumValueOf(name); -} - -class EnumTestEnumIntegerEnum extends EnumClass { - - @BuiltValueEnumConst(wireNumber: 1) - static const EnumTestEnumIntegerEnum number1 = _$enumTestEnumIntegerEnum_number1; - @BuiltValueEnumConst(wireNumber: -1) - static const EnumTestEnumIntegerEnum numberNegative1 = _$enumTestEnumIntegerEnum_numberNegative1; - - static Serializer get serializer => _$enumTestEnumIntegerEnumSerializer; - - const EnumTestEnumIntegerEnum._(String name): super(name); - - static BuiltSet get values => _$enumTestEnumIntegerEnumValues; - static EnumTestEnumIntegerEnum valueOf(String name) => _$enumTestEnumIntegerEnumValueOf(name); -} - -class EnumTestEnumNumberEnum extends EnumClass { - - @BuiltValueEnumConst(wireName: r'1.1') - static const EnumTestEnumNumberEnum number1Period1 = _$enumTestEnumNumberEnum_number1Period1; - @BuiltValueEnumConst(wireName: r'-1.2') - static const EnumTestEnumNumberEnum numberNegative1Period2 = _$enumTestEnumNumberEnum_numberNegative1Period2; - - static Serializer get serializer => _$enumTestEnumNumberEnumSerializer; - - const EnumTestEnumNumberEnum._(String name): super(name); - - static BuiltSet get values => _$enumTestEnumNumberEnumValues; - static EnumTestEnumNumberEnum valueOf(String name) => _$enumTestEnumNumberEnumValueOf(name); -} - diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/file_schema_test_class.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/file_schema_test_class.dart deleted file mode 100644 index 7a2090e87da..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/file_schema_test_class.dart +++ /dev/null @@ -1,88 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -import 'package:built_collection/built_collection.dart'; -import 'package:openapi/src/model/model_file.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'file_schema_test_class.g.dart'; - -/// FileSchemaTestClass -/// -/// Properties: -/// * [file] -/// * [files] -abstract class FileSchemaTestClass implements Built { - @BuiltValueField(wireName: r'file') - ModelFile? get file; - - @BuiltValueField(wireName: r'files') - BuiltList? get files; - - FileSchemaTestClass._(); - - @BuiltValueHook(initializeBuilder: true) - static void _defaults(FileSchemaTestClassBuilder b) => b; - - factory FileSchemaTestClass([void updates(FileSchemaTestClassBuilder b)]) = _$FileSchemaTestClass; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$FileSchemaTestClassSerializer(); -} - -class _$FileSchemaTestClassSerializer implements StructuredSerializer { - @override - final Iterable types = const [FileSchemaTestClass, _$FileSchemaTestClass]; - - @override - final String wireName = r'FileSchemaTestClass'; - - @override - Iterable serialize(Serializers serializers, FileSchemaTestClass object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.file != null) { - result - ..add(r'file') - ..add(serializers.serialize(object.file, - specifiedType: const FullType(ModelFile))); - } - if (object.files != null) { - result - ..add(r'files') - ..add(serializers.serialize(object.files, - specifiedType: const FullType(BuiltList, [FullType(ModelFile)]))); - } - return result; - } - - @override - FileSchemaTestClass deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = FileSchemaTestClassBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final Object? value = iterator.current; - - switch (key) { - case r'file': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(ModelFile)) as ModelFile; - result.file.replace(valueDes); - break; - case r'files': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(ModelFile)])) as BuiltList; - result.files.replace(valueDes); - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/foo.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/foo.dart deleted file mode 100644 index dd3691968d4..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/foo.dart +++ /dev/null @@ -1,72 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'foo.g.dart'; - -/// Foo -/// -/// Properties: -/// * [bar] -abstract class Foo implements Built { - @BuiltValueField(wireName: r'bar') - String? get bar; - - Foo._(); - - @BuiltValueHook(initializeBuilder: true) - static void _defaults(FooBuilder b) => b - ..bar = 'bar'; - - factory Foo([void updates(FooBuilder b)]) = _$Foo; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$FooSerializer(); -} - -class _$FooSerializer implements StructuredSerializer { - @override - final Iterable types = const [Foo, _$Foo]; - - @override - final String wireName = r'Foo'; - - @override - Iterable serialize(Serializers serializers, Foo object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.bar != null) { - result - ..add(r'bar') - ..add(serializers.serialize(object.bar, - specifiedType: const FullType(String))); - } - return result; - } - - @override - Foo deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = FooBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final Object? value = iterator.current; - - switch (key) { - case r'bar': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - result.bar = valueDes; - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/format_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/format_test.dart deleted file mode 100644 index cf1be44ab5b..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/format_test.dart +++ /dev/null @@ -1,292 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -import 'dart:typed_data'; -import 'package:openapi/src/model/date.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'format_test.g.dart'; - -/// FormatTest -/// -/// Properties: -/// * [integer] -/// * [int32] -/// * [int64] -/// * [number] -/// * [float] -/// * [double_] -/// * [decimal] -/// * [string] -/// * [byte] -/// * [binary] -/// * [date] -/// * [dateTime] -/// * [uuid] -/// * [password] -/// * [patternWithDigits] - A string that is a 10 digit number. Can have leading zeros. -/// * [patternWithDigitsAndDelimiter] - A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. -abstract class FormatTest implements Built { - @BuiltValueField(wireName: r'integer') - int? get integer; - - @BuiltValueField(wireName: r'int32') - int? get int32; - - @BuiltValueField(wireName: r'int64') - int? get int64; - - @BuiltValueField(wireName: r'number') - num get number; - - @BuiltValueField(wireName: r'float') - double? get float; - - @BuiltValueField(wireName: r'double') - double? get double_; - - @BuiltValueField(wireName: r'decimal') - double? get decimal; - - @BuiltValueField(wireName: r'string') - String? get string; - - @BuiltValueField(wireName: r'byte') - String get byte; - - @BuiltValueField(wireName: r'binary') - Uint8List? get binary; - - @BuiltValueField(wireName: r'date') - Date get date; - - @BuiltValueField(wireName: r'dateTime') - DateTime? get dateTime; - - @BuiltValueField(wireName: r'uuid') - String? get uuid; - - @BuiltValueField(wireName: r'password') - String get password; - - /// A string that is a 10 digit number. Can have leading zeros. - @BuiltValueField(wireName: r'pattern_with_digits') - String? get patternWithDigits; - - /// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. - @BuiltValueField(wireName: r'pattern_with_digits_and_delimiter') - String? get patternWithDigitsAndDelimiter; - - FormatTest._(); - - @BuiltValueHook(initializeBuilder: true) - static void _defaults(FormatTestBuilder b) => b; - - factory FormatTest([void updates(FormatTestBuilder b)]) = _$FormatTest; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$FormatTestSerializer(); -} - -class _$FormatTestSerializer implements StructuredSerializer { - @override - final Iterable types = const [FormatTest, _$FormatTest]; - - @override - final String wireName = r'FormatTest'; - - @override - Iterable serialize(Serializers serializers, FormatTest object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.integer != null) { - result - ..add(r'integer') - ..add(serializers.serialize(object.integer, - specifiedType: const FullType(int))); - } - if (object.int32 != null) { - result - ..add(r'int32') - ..add(serializers.serialize(object.int32, - specifiedType: const FullType(int))); - } - if (object.int64 != null) { - result - ..add(r'int64') - ..add(serializers.serialize(object.int64, - specifiedType: const FullType(int))); - } - result - ..add(r'number') - ..add(serializers.serialize(object.number, - specifiedType: const FullType(num))); - if (object.float != null) { - result - ..add(r'float') - ..add(serializers.serialize(object.float, - specifiedType: const FullType(double))); - } - if (object.double_ != null) { - result - ..add(r'double') - ..add(serializers.serialize(object.double_, - specifiedType: const FullType(double))); - } - if (object.decimal != null) { - result - ..add(r'decimal') - ..add(serializers.serialize(object.decimal, - specifiedType: const FullType(double))); - } - if (object.string != null) { - result - ..add(r'string') - ..add(serializers.serialize(object.string, - specifiedType: const FullType(String))); - } - result - ..add(r'byte') - ..add(serializers.serialize(object.byte, - specifiedType: const FullType(String))); - if (object.binary != null) { - result - ..add(r'binary') - ..add(serializers.serialize(object.binary, - specifiedType: const FullType(Uint8List))); - } - result - ..add(r'date') - ..add(serializers.serialize(object.date, - specifiedType: const FullType(Date))); - if (object.dateTime != null) { - result - ..add(r'dateTime') - ..add(serializers.serialize(object.dateTime, - specifiedType: const FullType(DateTime))); - } - if (object.uuid != null) { - result - ..add(r'uuid') - ..add(serializers.serialize(object.uuid, - specifiedType: const FullType(String))); - } - result - ..add(r'password') - ..add(serializers.serialize(object.password, - specifiedType: const FullType(String))); - if (object.patternWithDigits != null) { - result - ..add(r'pattern_with_digits') - ..add(serializers.serialize(object.patternWithDigits, - specifiedType: const FullType(String))); - } - if (object.patternWithDigitsAndDelimiter != null) { - result - ..add(r'pattern_with_digits_and_delimiter') - ..add(serializers.serialize(object.patternWithDigitsAndDelimiter, - specifiedType: const FullType(String))); - } - return result; - } - - @override - FormatTest deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = FormatTestBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final Object? value = iterator.current; - - switch (key) { - case r'integer': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; - result.integer = valueDes; - break; - case r'int32': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; - result.int32 = valueDes; - break; - case r'int64': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; - result.int64 = valueDes; - break; - case r'number': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(num)) as num; - result.number = valueDes; - break; - case r'float': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(double)) as double; - result.float = valueDes; - break; - case r'double': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(double)) as double; - result.double_ = valueDes; - break; - case r'decimal': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(double)) as double; - result.decimal = valueDes; - break; - case r'string': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - result.string = valueDes; - break; - case r'byte': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - result.byte = valueDes; - break; - case r'binary': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(Uint8List)) as Uint8List; - result.binary = valueDes; - break; - case r'date': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(Date)) as Date; - result.date = valueDes; - break; - case r'dateTime': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(DateTime)) as DateTime; - result.dateTime = valueDes; - break; - case r'uuid': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - result.uuid = valueDes; - break; - case r'password': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - result.password = valueDes; - break; - case r'pattern_with_digits': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - result.patternWithDigits = valueDes; - break; - case r'pattern_with_digits_and_delimiter': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - result.patternWithDigitsAndDelimiter = valueDes; - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/has_only_read_only.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/has_only_read_only.dart deleted file mode 100644 index 21b44ece26e..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/has_only_read_only.dart +++ /dev/null @@ -1,86 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'has_only_read_only.g.dart'; - -/// HasOnlyReadOnly -/// -/// Properties: -/// * [bar] -/// * [foo] -abstract class HasOnlyReadOnly implements Built { - @BuiltValueField(wireName: r'bar') - String? get bar; - - @BuiltValueField(wireName: r'foo') - String? get foo; - - HasOnlyReadOnly._(); - - @BuiltValueHook(initializeBuilder: true) - static void _defaults(HasOnlyReadOnlyBuilder b) => b; - - factory HasOnlyReadOnly([void updates(HasOnlyReadOnlyBuilder b)]) = _$HasOnlyReadOnly; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$HasOnlyReadOnlySerializer(); -} - -class _$HasOnlyReadOnlySerializer implements StructuredSerializer { - @override - final Iterable types = const [HasOnlyReadOnly, _$HasOnlyReadOnly]; - - @override - final String wireName = r'HasOnlyReadOnly'; - - @override - Iterable serialize(Serializers serializers, HasOnlyReadOnly object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.bar != null) { - result - ..add(r'bar') - ..add(serializers.serialize(object.bar, - specifiedType: const FullType(String))); - } - if (object.foo != null) { - result - ..add(r'foo') - ..add(serializers.serialize(object.foo, - specifiedType: const FullType(String))); - } - return result; - } - - @override - HasOnlyReadOnly deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = HasOnlyReadOnlyBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final Object? value = iterator.current; - - switch (key) { - case r'bar': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - result.bar = valueDes; - break; - case r'foo': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - result.foo = valueDes; - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/health_check_result.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/health_check_result.dart deleted file mode 100644 index e589cb7bd35..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/health_check_result.dart +++ /dev/null @@ -1,72 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'health_check_result.g.dart'; - -/// Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model. -/// -/// Properties: -/// * [nullableMessage] -abstract class HealthCheckResult implements Built { - @BuiltValueField(wireName: r'NullableMessage') - String? get nullableMessage; - - HealthCheckResult._(); - - @BuiltValueHook(initializeBuilder: true) - static void _defaults(HealthCheckResultBuilder b) => b; - - factory HealthCheckResult([void updates(HealthCheckResultBuilder b)]) = _$HealthCheckResult; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$HealthCheckResultSerializer(); -} - -class _$HealthCheckResultSerializer implements StructuredSerializer { - @override - final Iterable types = const [HealthCheckResult, _$HealthCheckResult]; - - @override - final String wireName = r'HealthCheckResult'; - - @override - Iterable serialize(Serializers serializers, HealthCheckResult object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.nullableMessage != null) { - result - ..add(r'NullableMessage') - ..add(serializers.serialize(object.nullableMessage, - specifiedType: const FullType.nullable(String))); - } - return result; - } - - @override - HealthCheckResult deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = HealthCheckResultBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final Object? value = iterator.current; - - switch (key) { - case r'NullableMessage': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType.nullable(String)) as String?; - if (valueDes == null) continue; - result.nullableMessage = valueDes; - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/inline_response_default.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/inline_response_default.dart deleted file mode 100644 index b611f8beb6a..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/inline_response_default.dart +++ /dev/null @@ -1,72 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -import 'package:openapi/src/model/foo.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'inline_response_default.g.dart'; - -/// InlineResponseDefault -/// -/// Properties: -/// * [string] -abstract class InlineResponseDefault implements Built { - @BuiltValueField(wireName: r'string') - Foo? get string; - - InlineResponseDefault._(); - - @BuiltValueHook(initializeBuilder: true) - static void _defaults(InlineResponseDefaultBuilder b) => b; - - factory InlineResponseDefault([void updates(InlineResponseDefaultBuilder b)]) = _$InlineResponseDefault; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$InlineResponseDefaultSerializer(); -} - -class _$InlineResponseDefaultSerializer implements StructuredSerializer { - @override - final Iterable types = const [InlineResponseDefault, _$InlineResponseDefault]; - - @override - final String wireName = r'InlineResponseDefault'; - - @override - Iterable serialize(Serializers serializers, InlineResponseDefault object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.string != null) { - result - ..add(r'string') - ..add(serializers.serialize(object.string, - specifiedType: const FullType(Foo))); - } - return result; - } - - @override - InlineResponseDefault deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = InlineResponseDefaultBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final Object? value = iterator.current; - - switch (key) { - case r'string': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(Foo)) as Foo; - result.string.replace(valueDes); - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/map_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/map_test.dart deleted file mode 100644 index e5ae30f2290..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/map_test.dart +++ /dev/null @@ -1,133 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -import 'package:built_collection/built_collection.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'map_test.g.dart'; - -/// MapTest -/// -/// Properties: -/// * [mapMapOfString] -/// * [mapOfEnumString] -/// * [directMap] -/// * [indirectMap] -abstract class MapTest implements Built { - @BuiltValueField(wireName: r'map_map_of_string') - BuiltMap>? get mapMapOfString; - - @BuiltValueField(wireName: r'map_of_enum_string') - BuiltMap? get mapOfEnumString; - // enum mapOfEnumStringEnum { UPPER, lower, }; - - @BuiltValueField(wireName: r'direct_map') - BuiltMap? get directMap; - - @BuiltValueField(wireName: r'indirect_map') - BuiltMap? get indirectMap; - - MapTest._(); - - @BuiltValueHook(initializeBuilder: true) - static void _defaults(MapTestBuilder b) => b; - - factory MapTest([void updates(MapTestBuilder b)]) = _$MapTest; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$MapTestSerializer(); -} - -class _$MapTestSerializer implements StructuredSerializer { - @override - final Iterable types = const [MapTest, _$MapTest]; - - @override - final String wireName = r'MapTest'; - - @override - Iterable serialize(Serializers serializers, MapTest object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.mapMapOfString != null) { - result - ..add(r'map_map_of_string') - ..add(serializers.serialize(object.mapMapOfString, - specifiedType: const FullType(BuiltMap, [FullType(String), FullType(BuiltMap, [FullType(String), FullType(String)])]))); - } - if (object.mapOfEnumString != null) { - result - ..add(r'map_of_enum_string') - ..add(serializers.serialize(object.mapOfEnumString, - specifiedType: const FullType(BuiltMap, [FullType(String), FullType(MapTestMapOfEnumStringEnum)]))); - } - if (object.directMap != null) { - result - ..add(r'direct_map') - ..add(serializers.serialize(object.directMap, - specifiedType: const FullType(BuiltMap, [FullType(String), FullType(bool)]))); - } - if (object.indirectMap != null) { - result - ..add(r'indirect_map') - ..add(serializers.serialize(object.indirectMap, - specifiedType: const FullType(BuiltMap, [FullType(String), FullType(bool)]))); - } - return result; - } - - @override - MapTest deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = MapTestBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final Object? value = iterator.current; - - switch (key) { - case r'map_map_of_string': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(BuiltMap, [FullType(String), FullType(BuiltMap, [FullType(String), FullType(String)])])) as BuiltMap>; - result.mapMapOfString.replace(valueDes); - break; - case r'map_of_enum_string': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(BuiltMap, [FullType(String), FullType(MapTestMapOfEnumStringEnum)])) as BuiltMap; - result.mapOfEnumString.replace(valueDes); - break; - case r'direct_map': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(BuiltMap, [FullType(String), FullType(bool)])) as BuiltMap; - result.directMap.replace(valueDes); - break; - case r'indirect_map': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(BuiltMap, [FullType(String), FullType(bool)])) as BuiltMap; - result.indirectMap.replace(valueDes); - break; - } - } - return result.build(); - } -} - -class MapTestMapOfEnumStringEnum extends EnumClass { - - @BuiltValueEnumConst(wireName: r'UPPER') - static const MapTestMapOfEnumStringEnum UPPER = _$mapTestMapOfEnumStringEnum_UPPER; - @BuiltValueEnumConst(wireName: r'lower') - static const MapTestMapOfEnumStringEnum lower = _$mapTestMapOfEnumStringEnum_lower; - - static Serializer get serializer => _$mapTestMapOfEnumStringEnumSerializer; - - const MapTestMapOfEnumStringEnum._(String name): super(name); - - static BuiltSet get values => _$mapTestMapOfEnumStringEnumValues; - static MapTestMapOfEnumStringEnum valueOf(String name) => _$mapTestMapOfEnumStringEnumValueOf(name); -} - diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/mixed_properties_and_additional_properties_class.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/mixed_properties_and_additional_properties_class.dart deleted file mode 100644 index 27c6993cc70..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/mixed_properties_and_additional_properties_class.dart +++ /dev/null @@ -1,103 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -import 'package:built_collection/built_collection.dart'; -import 'package:openapi/src/model/animal.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'mixed_properties_and_additional_properties_class.g.dart'; - -/// MixedPropertiesAndAdditionalPropertiesClass -/// -/// Properties: -/// * [uuid] -/// * [dateTime] -/// * [map] -abstract class MixedPropertiesAndAdditionalPropertiesClass implements Built { - @BuiltValueField(wireName: r'uuid') - String? get uuid; - - @BuiltValueField(wireName: r'dateTime') - DateTime? get dateTime; - - @BuiltValueField(wireName: r'map') - BuiltMap? get map; - - MixedPropertiesAndAdditionalPropertiesClass._(); - - @BuiltValueHook(initializeBuilder: true) - static void _defaults(MixedPropertiesAndAdditionalPropertiesClassBuilder b) => b; - - factory MixedPropertiesAndAdditionalPropertiesClass([void updates(MixedPropertiesAndAdditionalPropertiesClassBuilder b)]) = _$MixedPropertiesAndAdditionalPropertiesClass; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$MixedPropertiesAndAdditionalPropertiesClassSerializer(); -} - -class _$MixedPropertiesAndAdditionalPropertiesClassSerializer implements StructuredSerializer { - @override - final Iterable types = const [MixedPropertiesAndAdditionalPropertiesClass, _$MixedPropertiesAndAdditionalPropertiesClass]; - - @override - final String wireName = r'MixedPropertiesAndAdditionalPropertiesClass'; - - @override - Iterable serialize(Serializers serializers, MixedPropertiesAndAdditionalPropertiesClass object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.uuid != null) { - result - ..add(r'uuid') - ..add(serializers.serialize(object.uuid, - specifiedType: const FullType(String))); - } - if (object.dateTime != null) { - result - ..add(r'dateTime') - ..add(serializers.serialize(object.dateTime, - specifiedType: const FullType(DateTime))); - } - if (object.map != null) { - result - ..add(r'map') - ..add(serializers.serialize(object.map, - specifiedType: const FullType(BuiltMap, [FullType(String), FullType(Animal)]))); - } - return result; - } - - @override - MixedPropertiesAndAdditionalPropertiesClass deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = MixedPropertiesAndAdditionalPropertiesClassBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final Object? value = iterator.current; - - switch (key) { - case r'uuid': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - result.uuid = valueDes; - break; - case r'dateTime': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(DateTime)) as DateTime; - result.dateTime = valueDes; - break; - case r'map': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(BuiltMap, [FullType(String), FullType(Animal)])) as BuiltMap; - result.map.replace(valueDes); - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/model200_response.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/model200_response.dart deleted file mode 100644 index 7392f71fe84..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/model200_response.dart +++ /dev/null @@ -1,86 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'model200_response.g.dart'; - -/// Model for testing model name starting with number -/// -/// Properties: -/// * [name] -/// * [class_] -abstract class Model200Response implements Built { - @BuiltValueField(wireName: r'name') - int? get name; - - @BuiltValueField(wireName: r'class') - String? get class_; - - Model200Response._(); - - @BuiltValueHook(initializeBuilder: true) - static void _defaults(Model200ResponseBuilder b) => b; - - factory Model200Response([void updates(Model200ResponseBuilder b)]) = _$Model200Response; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$Model200ResponseSerializer(); -} - -class _$Model200ResponseSerializer implements StructuredSerializer { - @override - final Iterable types = const [Model200Response, _$Model200Response]; - - @override - final String wireName = r'Model200Response'; - - @override - Iterable serialize(Serializers serializers, Model200Response object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.name != null) { - result - ..add(r'name') - ..add(serializers.serialize(object.name, - specifiedType: const FullType(int))); - } - if (object.class_ != null) { - result - ..add(r'class') - ..add(serializers.serialize(object.class_, - specifiedType: const FullType(String))); - } - return result; - } - - @override - Model200Response deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = Model200ResponseBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final Object? value = iterator.current; - - switch (key) { - case r'name': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; - result.name = valueDes; - break; - case r'class': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - result.class_ = valueDes; - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/model_client.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/model_client.dart deleted file mode 100644 index 23c30a77f2b..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/model_client.dart +++ /dev/null @@ -1,71 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'model_client.g.dart'; - -/// ModelClient -/// -/// Properties: -/// * [client] -abstract class ModelClient implements Built { - @BuiltValueField(wireName: r'client') - String? get client; - - ModelClient._(); - - @BuiltValueHook(initializeBuilder: true) - static void _defaults(ModelClientBuilder b) => b; - - factory ModelClient([void updates(ModelClientBuilder b)]) = _$ModelClient; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$ModelClientSerializer(); -} - -class _$ModelClientSerializer implements StructuredSerializer { - @override - final Iterable types = const [ModelClient, _$ModelClient]; - - @override - final String wireName = r'ModelClient'; - - @override - Iterable serialize(Serializers serializers, ModelClient object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.client != null) { - result - ..add(r'client') - ..add(serializers.serialize(object.client, - specifiedType: const FullType(String))); - } - return result; - } - - @override - ModelClient deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = ModelClientBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final Object? value = iterator.current; - - switch (key) { - case r'client': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - result.client = valueDes; - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/model_enum_class.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/model_enum_class.dart deleted file mode 100644 index ba6ca8c45dd..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/model_enum_class.dart +++ /dev/null @@ -1,35 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -import 'package:built_collection/built_collection.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'model_enum_class.g.dart'; - -class ModelEnumClass extends EnumClass { - - @BuiltValueEnumConst(wireName: r'_abc') - static const ModelEnumClass abc = _$abc; - @BuiltValueEnumConst(wireName: r'-efg') - static const ModelEnumClass efg = _$efg; - @BuiltValueEnumConst(wireName: r'(xyz)') - static const ModelEnumClass leftParenthesisXyzRightParenthesis = _$leftParenthesisXyzRightParenthesis; - - static Serializer get serializer => _$modelEnumClassSerializer; - - const ModelEnumClass._(String name): super(name); - - static BuiltSet get values => _$values; - static ModelEnumClass valueOf(String name) => _$valueOf(name); -} - -/// Optionally, enum_class can generate a mixin to go with your enum for use -/// with Angular. It exposes your enum constants as getters. So, if you mix it -/// in to your Dart component class, the values become available to the -/// corresponding Angular template. -/// -/// Trigger mixin generation by writing a line like this one next to your enum. -abstract class ModelEnumClassMixin = Object with _$ModelEnumClassMixin; - diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/model_file.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/model_file.dart deleted file mode 100644 index aa7b5ecfedd..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/model_file.dart +++ /dev/null @@ -1,72 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'model_file.g.dart'; - -/// Must be named `File` for test. -/// -/// Properties: -/// * [sourceURI] - Test capitalization -abstract class ModelFile implements Built { - /// Test capitalization - @BuiltValueField(wireName: r'sourceURI') - String? get sourceURI; - - ModelFile._(); - - @BuiltValueHook(initializeBuilder: true) - static void _defaults(ModelFileBuilder b) => b; - - factory ModelFile([void updates(ModelFileBuilder b)]) = _$ModelFile; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$ModelFileSerializer(); -} - -class _$ModelFileSerializer implements StructuredSerializer { - @override - final Iterable types = const [ModelFile, _$ModelFile]; - - @override - final String wireName = r'ModelFile'; - - @override - Iterable serialize(Serializers serializers, ModelFile object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.sourceURI != null) { - result - ..add(r'sourceURI') - ..add(serializers.serialize(object.sourceURI, - specifiedType: const FullType(String))); - } - return result; - } - - @override - ModelFile deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = ModelFileBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final Object? value = iterator.current; - - switch (key) { - case r'sourceURI': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - result.sourceURI = valueDes; - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/model_list.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/model_list.dart deleted file mode 100644 index 87e10153b1a..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/model_list.dart +++ /dev/null @@ -1,71 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'model_list.g.dart'; - -/// ModelList -/// -/// Properties: -/// * [n123list] -abstract class ModelList implements Built { - @BuiltValueField(wireName: r'123-list') - String? get n123list; - - ModelList._(); - - @BuiltValueHook(initializeBuilder: true) - static void _defaults(ModelListBuilder b) => b; - - factory ModelList([void updates(ModelListBuilder b)]) = _$ModelList; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$ModelListSerializer(); -} - -class _$ModelListSerializer implements StructuredSerializer { - @override - final Iterable types = const [ModelList, _$ModelList]; - - @override - final String wireName = r'ModelList'; - - @override - Iterable serialize(Serializers serializers, ModelList object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.n123list != null) { - result - ..add(r'123-list') - ..add(serializers.serialize(object.n123list, - specifiedType: const FullType(String))); - } - return result; - } - - @override - ModelList deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = ModelListBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final Object? value = iterator.current; - - switch (key) { - case r'123-list': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - result.n123list = valueDes; - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/model_return.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/model_return.dart deleted file mode 100644 index c63e0464faa..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/model_return.dart +++ /dev/null @@ -1,71 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'model_return.g.dart'; - -/// Model for testing reserved words -/// -/// Properties: -/// * [return_] -abstract class ModelReturn implements Built { - @BuiltValueField(wireName: r'return') - int? get return_; - - ModelReturn._(); - - @BuiltValueHook(initializeBuilder: true) - static void _defaults(ModelReturnBuilder b) => b; - - factory ModelReturn([void updates(ModelReturnBuilder b)]) = _$ModelReturn; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$ModelReturnSerializer(); -} - -class _$ModelReturnSerializer implements StructuredSerializer { - @override - final Iterable types = const [ModelReturn, _$ModelReturn]; - - @override - final String wireName = r'ModelReturn'; - - @override - Iterable serialize(Serializers serializers, ModelReturn object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.return_ != null) { - result - ..add(r'return') - ..add(serializers.serialize(object.return_, - specifiedType: const FullType(int))); - } - return result; - } - - @override - ModelReturn deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = ModelReturnBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final Object? value = iterator.current; - - switch (key) { - case r'return': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; - result.return_ = valueDes; - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/name.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/name.dart deleted file mode 100644 index 78f9f8e545e..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/name.dart +++ /dev/null @@ -1,114 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'name.g.dart'; - -/// Model for testing model name same as property name -/// -/// Properties: -/// * [name] -/// * [snakeCase] -/// * [property] -/// * [n123number] -abstract class Name implements Built { - @BuiltValueField(wireName: r'name') - int get name; - - @BuiltValueField(wireName: r'snake_case') - int? get snakeCase; - - @BuiltValueField(wireName: r'property') - String? get property; - - @BuiltValueField(wireName: r'123Number') - int? get n123number; - - Name._(); - - @BuiltValueHook(initializeBuilder: true) - static void _defaults(NameBuilder b) => b; - - factory Name([void updates(NameBuilder b)]) = _$Name; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$NameSerializer(); -} - -class _$NameSerializer implements StructuredSerializer { - @override - final Iterable types = const [Name, _$Name]; - - @override - final String wireName = r'Name'; - - @override - Iterable serialize(Serializers serializers, Name object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - result - ..add(r'name') - ..add(serializers.serialize(object.name, - specifiedType: const FullType(int))); - if (object.snakeCase != null) { - result - ..add(r'snake_case') - ..add(serializers.serialize(object.snakeCase, - specifiedType: const FullType(int))); - } - if (object.property != null) { - result - ..add(r'property') - ..add(serializers.serialize(object.property, - specifiedType: const FullType(String))); - } - if (object.n123number != null) { - result - ..add(r'123Number') - ..add(serializers.serialize(object.n123number, - specifiedType: const FullType(int))); - } - return result; - } - - @override - Name deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = NameBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final Object? value = iterator.current; - - switch (key) { - case r'name': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; - result.name = valueDes; - break; - case r'snake_case': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; - result.snakeCase = valueDes; - break; - case r'property': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - result.property = valueDes; - break; - case r'123Number': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; - result.n123number = valueDes; - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/nullable_class.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/nullable_class.dart deleted file mode 100644 index efddc42e307..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/nullable_class.dart +++ /dev/null @@ -1,249 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -import 'package:built_collection/built_collection.dart'; -import 'package:openapi/src/model/date.dart'; -import 'package:built_value/json_object.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'nullable_class.g.dart'; - -/// NullableClass -/// -/// Properties: -/// * [integerProp] -/// * [numberProp] -/// * [booleanProp] -/// * [stringProp] -/// * [dateProp] -/// * [datetimeProp] -/// * [arrayNullableProp] -/// * [arrayAndItemsNullableProp] -/// * [arrayItemsNullable] -/// * [objectNullableProp] -/// * [objectAndItemsNullableProp] -/// * [objectItemsNullable] -abstract class NullableClass implements Built { - @BuiltValueField(wireName: r'integer_prop') - int? get integerProp; - - @BuiltValueField(wireName: r'number_prop') - num? get numberProp; - - @BuiltValueField(wireName: r'boolean_prop') - bool? get booleanProp; - - @BuiltValueField(wireName: r'string_prop') - String? get stringProp; - - @BuiltValueField(wireName: r'date_prop') - Date? get dateProp; - - @BuiltValueField(wireName: r'datetime_prop') - DateTime? get datetimeProp; - - @BuiltValueField(wireName: r'array_nullable_prop') - BuiltList? get arrayNullableProp; - - @BuiltValueField(wireName: r'array_and_items_nullable_prop') - BuiltList? get arrayAndItemsNullableProp; - - @BuiltValueField(wireName: r'array_items_nullable') - BuiltList? get arrayItemsNullable; - - @BuiltValueField(wireName: r'object_nullable_prop') - BuiltMap? get objectNullableProp; - - @BuiltValueField(wireName: r'object_and_items_nullable_prop') - BuiltMap? get objectAndItemsNullableProp; - - @BuiltValueField(wireName: r'object_items_nullable') - BuiltMap? get objectItemsNullable; - - NullableClass._(); - - @BuiltValueHook(initializeBuilder: true) - static void _defaults(NullableClassBuilder b) => b; - - factory NullableClass([void updates(NullableClassBuilder b)]) = _$NullableClass; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$NullableClassSerializer(); -} - -class _$NullableClassSerializer implements StructuredSerializer { - @override - final Iterable types = const [NullableClass, _$NullableClass]; - - @override - final String wireName = r'NullableClass'; - - @override - Iterable serialize(Serializers serializers, NullableClass object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.integerProp != null) { - result - ..add(r'integer_prop') - ..add(serializers.serialize(object.integerProp, - specifiedType: const FullType.nullable(int))); - } - if (object.numberProp != null) { - result - ..add(r'number_prop') - ..add(serializers.serialize(object.numberProp, - specifiedType: const FullType.nullable(num))); - } - if (object.booleanProp != null) { - result - ..add(r'boolean_prop') - ..add(serializers.serialize(object.booleanProp, - specifiedType: const FullType.nullable(bool))); - } - if (object.stringProp != null) { - result - ..add(r'string_prop') - ..add(serializers.serialize(object.stringProp, - specifiedType: const FullType.nullable(String))); - } - if (object.dateProp != null) { - result - ..add(r'date_prop') - ..add(serializers.serialize(object.dateProp, - specifiedType: const FullType.nullable(Date))); - } - if (object.datetimeProp != null) { - result - ..add(r'datetime_prop') - ..add(serializers.serialize(object.datetimeProp, - specifiedType: const FullType.nullable(DateTime))); - } - if (object.arrayNullableProp != null) { - result - ..add(r'array_nullable_prop') - ..add(serializers.serialize(object.arrayNullableProp, - specifiedType: const FullType.nullable(BuiltList, [FullType(JsonObject)]))); - } - if (object.arrayAndItemsNullableProp != null) { - result - ..add(r'array_and_items_nullable_prop') - ..add(serializers.serialize(object.arrayAndItemsNullableProp, - specifiedType: const FullType.nullable(BuiltList, [FullType.nullable(JsonObject)]))); - } - if (object.arrayItemsNullable != null) { - result - ..add(r'array_items_nullable') - ..add(serializers.serialize(object.arrayItemsNullable, - specifiedType: const FullType(BuiltList, [FullType.nullable(JsonObject)]))); - } - if (object.objectNullableProp != null) { - result - ..add(r'object_nullable_prop') - ..add(serializers.serialize(object.objectNullableProp, - specifiedType: const FullType.nullable(BuiltMap, [FullType(String), FullType(JsonObject)]))); - } - if (object.objectAndItemsNullableProp != null) { - result - ..add(r'object_and_items_nullable_prop') - ..add(serializers.serialize(object.objectAndItemsNullableProp, - specifiedType: const FullType.nullable(BuiltMap, [FullType(String), FullType.nullable(JsonObject)]))); - } - if (object.objectItemsNullable != null) { - result - ..add(r'object_items_nullable') - ..add(serializers.serialize(object.objectItemsNullable, - specifiedType: const FullType(BuiltMap, [FullType(String), FullType.nullable(JsonObject)]))); - } - return result; - } - - @override - NullableClass deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = NullableClassBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final Object? value = iterator.current; - - switch (key) { - case r'integer_prop': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType.nullable(int)) as int?; - if (valueDes == null) continue; - result.integerProp = valueDes; - break; - case r'number_prop': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType.nullable(num)) as num?; - if (valueDes == null) continue; - result.numberProp = valueDes; - break; - case r'boolean_prop': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType.nullable(bool)) as bool?; - if (valueDes == null) continue; - result.booleanProp = valueDes; - break; - case r'string_prop': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType.nullable(String)) as String?; - if (valueDes == null) continue; - result.stringProp = valueDes; - break; - case r'date_prop': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType.nullable(Date)) as Date?; - if (valueDes == null) continue; - result.dateProp = valueDes; - break; - case r'datetime_prop': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType.nullable(DateTime)) as DateTime?; - if (valueDes == null) continue; - result.datetimeProp = valueDes; - break; - case r'array_nullable_prop': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType.nullable(BuiltList, [FullType(JsonObject)])) as BuiltList?; - if (valueDes == null) continue; - result.arrayNullableProp.replace(valueDes); - break; - case r'array_and_items_nullable_prop': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType.nullable(BuiltList, [FullType.nullable(JsonObject)])) as BuiltList?; - if (valueDes == null) continue; - result.arrayAndItemsNullableProp.replace(valueDes); - break; - case r'array_items_nullable': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType.nullable(JsonObject)])) as BuiltList; - result.arrayItemsNullable.replace(valueDes); - break; - case r'object_nullable_prop': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType.nullable(BuiltMap, [FullType(String), FullType(JsonObject)])) as BuiltMap?; - if (valueDes == null) continue; - result.objectNullableProp.replace(valueDes); - break; - case r'object_and_items_nullable_prop': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType.nullable(BuiltMap, [FullType(String), FullType.nullable(JsonObject)])) as BuiltMap?; - if (valueDes == null) continue; - result.objectAndItemsNullableProp.replace(valueDes); - break; - case r'object_items_nullable': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(BuiltMap, [FullType(String), FullType.nullable(JsonObject)])) as BuiltMap; - result.objectItemsNullable.replace(valueDes); - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/number_only.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/number_only.dart deleted file mode 100644 index e90cc9b9340..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/number_only.dart +++ /dev/null @@ -1,71 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'number_only.g.dart'; - -/// NumberOnly -/// -/// Properties: -/// * [justNumber] -abstract class NumberOnly implements Built { - @BuiltValueField(wireName: r'JustNumber') - num? get justNumber; - - NumberOnly._(); - - @BuiltValueHook(initializeBuilder: true) - static void _defaults(NumberOnlyBuilder b) => b; - - factory NumberOnly([void updates(NumberOnlyBuilder b)]) = _$NumberOnly; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$NumberOnlySerializer(); -} - -class _$NumberOnlySerializer implements StructuredSerializer { - @override - final Iterable types = const [NumberOnly, _$NumberOnly]; - - @override - final String wireName = r'NumberOnly'; - - @override - Iterable serialize(Serializers serializers, NumberOnly object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.justNumber != null) { - result - ..add(r'JustNumber') - ..add(serializers.serialize(object.justNumber, - specifiedType: const FullType(num))); - } - return result; - } - - @override - NumberOnly deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = NumberOnlyBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final Object? value = iterator.current; - - switch (key) { - case r'JustNumber': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(num)) as num; - result.justNumber = valueDes; - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/object_with_deprecated_fields.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/object_with_deprecated_fields.dart deleted file mode 100644 index 881ede54d0d..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/object_with_deprecated_fields.dart +++ /dev/null @@ -1,118 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -import 'package:built_collection/built_collection.dart'; -import 'package:openapi/src/model/deprecated_object.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'object_with_deprecated_fields.g.dart'; - -/// ObjectWithDeprecatedFields -/// -/// Properties: -/// * [uuid] -/// * [id] -/// * [deprecatedRef] -/// * [bars] -abstract class ObjectWithDeprecatedFields implements Built { - @BuiltValueField(wireName: r'uuid') - String? get uuid; - - @BuiltValueField(wireName: r'id') - num? get id; - - @BuiltValueField(wireName: r'deprecatedRef') - DeprecatedObject? get deprecatedRef; - - @BuiltValueField(wireName: r'bars') - BuiltList? get bars; - - ObjectWithDeprecatedFields._(); - - @BuiltValueHook(initializeBuilder: true) - static void _defaults(ObjectWithDeprecatedFieldsBuilder b) => b; - - factory ObjectWithDeprecatedFields([void updates(ObjectWithDeprecatedFieldsBuilder b)]) = _$ObjectWithDeprecatedFields; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$ObjectWithDeprecatedFieldsSerializer(); -} - -class _$ObjectWithDeprecatedFieldsSerializer implements StructuredSerializer { - @override - final Iterable types = const [ObjectWithDeprecatedFields, _$ObjectWithDeprecatedFields]; - - @override - final String wireName = r'ObjectWithDeprecatedFields'; - - @override - Iterable serialize(Serializers serializers, ObjectWithDeprecatedFields object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.uuid != null) { - result - ..add(r'uuid') - ..add(serializers.serialize(object.uuid, - specifiedType: const FullType(String))); - } - if (object.id != null) { - result - ..add(r'id') - ..add(serializers.serialize(object.id, - specifiedType: const FullType(num))); - } - if (object.deprecatedRef != null) { - result - ..add(r'deprecatedRef') - ..add(serializers.serialize(object.deprecatedRef, - specifiedType: const FullType(DeprecatedObject))); - } - if (object.bars != null) { - result - ..add(r'bars') - ..add(serializers.serialize(object.bars, - specifiedType: const FullType(BuiltList, [FullType(String)]))); - } - return result; - } - - @override - ObjectWithDeprecatedFields deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = ObjectWithDeprecatedFieldsBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final Object? value = iterator.current; - - switch (key) { - case r'uuid': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - result.uuid = valueDes; - break; - case r'id': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(num)) as num; - result.id = valueDes; - break; - case r'deprecatedRef': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(DeprecatedObject)) as DeprecatedObject; - result.deprecatedRef.replace(valueDes); - break; - case r'bars': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(String)])) as BuiltList; - result.bars.replace(valueDes); - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/order.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/order.dart deleted file mode 100644 index 3f9aed72655..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/order.dart +++ /dev/null @@ -1,170 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -import 'package:built_collection/built_collection.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'order.g.dart'; - -/// Order -/// -/// Properties: -/// * [id] -/// * [petId] -/// * [quantity] -/// * [shipDate] -/// * [status] - Order Status -/// * [complete] -abstract class Order implements Built { - @BuiltValueField(wireName: r'id') - int? get id; - - @BuiltValueField(wireName: r'petId') - int? get petId; - - @BuiltValueField(wireName: r'quantity') - int? get quantity; - - @BuiltValueField(wireName: r'shipDate') - DateTime? get shipDate; - - /// Order Status - @BuiltValueField(wireName: r'status') - OrderStatusEnum? get status; - // enum statusEnum { placed, approved, delivered, }; - - @BuiltValueField(wireName: r'complete') - bool? get complete; - - Order._(); - - @BuiltValueHook(initializeBuilder: true) - static void _defaults(OrderBuilder b) => b - ..complete = false; - - factory Order([void updates(OrderBuilder b)]) = _$Order; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$OrderSerializer(); -} - -class _$OrderSerializer implements StructuredSerializer { - @override - final Iterable types = const [Order, _$Order]; - - @override - final String wireName = r'Order'; - - @override - Iterable serialize(Serializers serializers, Order object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.id != null) { - result - ..add(r'id') - ..add(serializers.serialize(object.id, - specifiedType: const FullType(int))); - } - if (object.petId != null) { - result - ..add(r'petId') - ..add(serializers.serialize(object.petId, - specifiedType: const FullType(int))); - } - if (object.quantity != null) { - result - ..add(r'quantity') - ..add(serializers.serialize(object.quantity, - specifiedType: const FullType(int))); - } - if (object.shipDate != null) { - result - ..add(r'shipDate') - ..add(serializers.serialize(object.shipDate, - specifiedType: const FullType(DateTime))); - } - if (object.status != null) { - result - ..add(r'status') - ..add(serializers.serialize(object.status, - specifiedType: const FullType(OrderStatusEnum))); - } - if (object.complete != null) { - result - ..add(r'complete') - ..add(serializers.serialize(object.complete, - specifiedType: const FullType(bool))); - } - return result; - } - - @override - Order deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = OrderBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final Object? value = iterator.current; - - switch (key) { - case r'id': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; - result.id = valueDes; - break; - case r'petId': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; - result.petId = valueDes; - break; - case r'quantity': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; - result.quantity = valueDes; - break; - case r'shipDate': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(DateTime)) as DateTime; - result.shipDate = valueDes; - break; - case r'status': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(OrderStatusEnum)) as OrderStatusEnum; - result.status = valueDes; - break; - case r'complete': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(bool)) as bool; - result.complete = valueDes; - break; - } - } - return result.build(); - } -} - -class OrderStatusEnum extends EnumClass { - - /// Order Status - @BuiltValueEnumConst(wireName: r'placed') - static const OrderStatusEnum placed = _$orderStatusEnum_placed; - /// Order Status - @BuiltValueEnumConst(wireName: r'approved') - static const OrderStatusEnum approved = _$orderStatusEnum_approved; - /// Order Status - @BuiltValueEnumConst(wireName: r'delivered') - static const OrderStatusEnum delivered = _$orderStatusEnum_delivered; - - static Serializer get serializer => _$orderStatusEnumSerializer; - - const OrderStatusEnum._(String name): super(name); - - static BuiltSet get values => _$orderStatusEnumValues; - static OrderStatusEnum valueOf(String name) => _$orderStatusEnumValueOf(name); -} - diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/outer_composite.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/outer_composite.dart deleted file mode 100644 index 0715bdff305..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/outer_composite.dart +++ /dev/null @@ -1,101 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'outer_composite.g.dart'; - -/// OuterComposite -/// -/// Properties: -/// * [myNumber] -/// * [myString] -/// * [myBoolean] -abstract class OuterComposite implements Built { - @BuiltValueField(wireName: r'my_number') - num? get myNumber; - - @BuiltValueField(wireName: r'my_string') - String? get myString; - - @BuiltValueField(wireName: r'my_boolean') - bool? get myBoolean; - - OuterComposite._(); - - @BuiltValueHook(initializeBuilder: true) - static void _defaults(OuterCompositeBuilder b) => b; - - factory OuterComposite([void updates(OuterCompositeBuilder b)]) = _$OuterComposite; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$OuterCompositeSerializer(); -} - -class _$OuterCompositeSerializer implements StructuredSerializer { - @override - final Iterable types = const [OuterComposite, _$OuterComposite]; - - @override - final String wireName = r'OuterComposite'; - - @override - Iterable serialize(Serializers serializers, OuterComposite object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.myNumber != null) { - result - ..add(r'my_number') - ..add(serializers.serialize(object.myNumber, - specifiedType: const FullType(num))); - } - if (object.myString != null) { - result - ..add(r'my_string') - ..add(serializers.serialize(object.myString, - specifiedType: const FullType(String))); - } - if (object.myBoolean != null) { - result - ..add(r'my_boolean') - ..add(serializers.serialize(object.myBoolean, - specifiedType: const FullType(bool))); - } - return result; - } - - @override - OuterComposite deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = OuterCompositeBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final Object? value = iterator.current; - - switch (key) { - case r'my_number': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(num)) as num; - result.myNumber = valueDes; - break; - case r'my_string': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - result.myString = valueDes; - break; - case r'my_boolean': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(bool)) as bool; - result.myBoolean = valueDes; - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/outer_enum.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/outer_enum.dart deleted file mode 100644 index 6476ca57d46..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/outer_enum.dart +++ /dev/null @@ -1,35 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -import 'package:built_collection/built_collection.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'outer_enum.g.dart'; - -class OuterEnum extends EnumClass { - - @BuiltValueEnumConst(wireName: r'placed') - static const OuterEnum placed = _$placed; - @BuiltValueEnumConst(wireName: r'approved') - static const OuterEnum approved = _$approved; - @BuiltValueEnumConst(wireName: r'delivered') - static const OuterEnum delivered = _$delivered; - - static Serializer get serializer => _$outerEnumSerializer; - - const OuterEnum._(String name): super(name); - - static BuiltSet get values => _$values; - static OuterEnum valueOf(String name) => _$valueOf(name); -} - -/// Optionally, enum_class can generate a mixin to go with your enum for use -/// with Angular. It exposes your enum constants as getters. So, if you mix it -/// in to your Dart component class, the values become available to the -/// corresponding Angular template. -/// -/// Trigger mixin generation by writing a line like this one next to your enum. -abstract class OuterEnumMixin = Object with _$OuterEnumMixin; - diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/outer_enum_default_value.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/outer_enum_default_value.dart deleted file mode 100644 index af04c76ed44..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/outer_enum_default_value.dart +++ /dev/null @@ -1,35 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -import 'package:built_collection/built_collection.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'outer_enum_default_value.g.dart'; - -class OuterEnumDefaultValue extends EnumClass { - - @BuiltValueEnumConst(wireName: r'placed') - static const OuterEnumDefaultValue placed = _$placed; - @BuiltValueEnumConst(wireName: r'approved') - static const OuterEnumDefaultValue approved = _$approved; - @BuiltValueEnumConst(wireName: r'delivered') - static const OuterEnumDefaultValue delivered = _$delivered; - - static Serializer get serializer => _$outerEnumDefaultValueSerializer; - - const OuterEnumDefaultValue._(String name): super(name); - - static BuiltSet get values => _$values; - static OuterEnumDefaultValue valueOf(String name) => _$valueOf(name); -} - -/// Optionally, enum_class can generate a mixin to go with your enum for use -/// with Angular. It exposes your enum constants as getters. So, if you mix it -/// in to your Dart component class, the values become available to the -/// corresponding Angular template. -/// -/// Trigger mixin generation by writing a line like this one next to your enum. -abstract class OuterEnumDefaultValueMixin = Object with _$OuterEnumDefaultValueMixin; - diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/outer_enum_integer.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/outer_enum_integer.dart deleted file mode 100644 index c3b4b7d8f5d..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/outer_enum_integer.dart +++ /dev/null @@ -1,35 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -import 'package:built_collection/built_collection.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'outer_enum_integer.g.dart'; - -class OuterEnumInteger extends EnumClass { - - @BuiltValueEnumConst(wireNumber: 0) - static const OuterEnumInteger number0 = _$number0; - @BuiltValueEnumConst(wireNumber: 1) - static const OuterEnumInteger number1 = _$number1; - @BuiltValueEnumConst(wireNumber: 2) - static const OuterEnumInteger number2 = _$number2; - - static Serializer get serializer => _$outerEnumIntegerSerializer; - - const OuterEnumInteger._(String name): super(name); - - static BuiltSet get values => _$values; - static OuterEnumInteger valueOf(String name) => _$valueOf(name); -} - -/// Optionally, enum_class can generate a mixin to go with your enum for use -/// with Angular. It exposes your enum constants as getters. So, if you mix it -/// in to your Dart component class, the values become available to the -/// corresponding Angular template. -/// -/// Trigger mixin generation by writing a line like this one next to your enum. -abstract class OuterEnumIntegerMixin = Object with _$OuterEnumIntegerMixin; - diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/outer_enum_integer_default_value.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/outer_enum_integer_default_value.dart deleted file mode 100644 index cf71a021765..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/outer_enum_integer_default_value.dart +++ /dev/null @@ -1,35 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -import 'package:built_collection/built_collection.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'outer_enum_integer_default_value.g.dart'; - -class OuterEnumIntegerDefaultValue extends EnumClass { - - @BuiltValueEnumConst(wireNumber: 0) - static const OuterEnumIntegerDefaultValue number0 = _$number0; - @BuiltValueEnumConst(wireNumber: 1) - static const OuterEnumIntegerDefaultValue number1 = _$number1; - @BuiltValueEnumConst(wireNumber: 2) - static const OuterEnumIntegerDefaultValue number2 = _$number2; - - static Serializer get serializer => _$outerEnumIntegerDefaultValueSerializer; - - const OuterEnumIntegerDefaultValue._(String name): super(name); - - static BuiltSet get values => _$values; - static OuterEnumIntegerDefaultValue valueOf(String name) => _$valueOf(name); -} - -/// Optionally, enum_class can generate a mixin to go with your enum for use -/// with Angular. It exposes your enum constants as getters. So, if you mix it -/// in to your Dart component class, the values become available to the -/// corresponding Angular template. -/// -/// Trigger mixin generation by writing a line like this one next to your enum. -abstract class OuterEnumIntegerDefaultValueMixin = Object with _$OuterEnumIntegerDefaultValueMixin; - diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/outer_object_with_enum_property.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/outer_object_with_enum_property.dart deleted file mode 100644 index 91524a285b8..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/outer_object_with_enum_property.dart +++ /dev/null @@ -1,71 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -import 'package:openapi/src/model/outer_enum_integer.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'outer_object_with_enum_property.g.dart'; - -/// OuterObjectWithEnumProperty -/// -/// Properties: -/// * [value] -abstract class OuterObjectWithEnumProperty implements Built { - @BuiltValueField(wireName: r'value') - OuterEnumInteger get value; - // enum valueEnum { 0, 1, 2, }; - - OuterObjectWithEnumProperty._(); - - @BuiltValueHook(initializeBuilder: true) - static void _defaults(OuterObjectWithEnumPropertyBuilder b) => b; - - factory OuterObjectWithEnumProperty([void updates(OuterObjectWithEnumPropertyBuilder b)]) = _$OuterObjectWithEnumProperty; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$OuterObjectWithEnumPropertySerializer(); -} - -class _$OuterObjectWithEnumPropertySerializer implements StructuredSerializer { - @override - final Iterable types = const [OuterObjectWithEnumProperty, _$OuterObjectWithEnumProperty]; - - @override - final String wireName = r'OuterObjectWithEnumProperty'; - - @override - Iterable serialize(Serializers serializers, OuterObjectWithEnumProperty object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - result - ..add(r'value') - ..add(serializers.serialize(object.value, - specifiedType: const FullType(OuterEnumInteger))); - return result; - } - - @override - OuterObjectWithEnumProperty deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = OuterObjectWithEnumPropertyBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final Object? value = iterator.current; - - switch (key) { - case r'value': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(OuterEnumInteger)) as OuterEnumInteger; - result.value = valueDes; - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/pet.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/pet.dart deleted file mode 100644 index 4aea3f370f9..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/pet.dart +++ /dev/null @@ -1,167 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -import 'package:built_collection/built_collection.dart'; -import 'package:openapi/src/model/category.dart'; -import 'package:openapi/src/model/tag.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'pet.g.dart'; - -/// Pet -/// -/// Properties: -/// * [id] -/// * [category] -/// * [name] -/// * [photoUrls] -/// * [tags] -/// * [status] - pet status in the store -abstract class Pet implements Built { - @BuiltValueField(wireName: r'id') - int? get id; - - @BuiltValueField(wireName: r'category') - Category? get category; - - @BuiltValueField(wireName: r'name') - String get name; - - @BuiltValueField(wireName: r'photoUrls') - BuiltSet get photoUrls; - - @BuiltValueField(wireName: r'tags') - BuiltList? get tags; - - /// pet status in the store - @BuiltValueField(wireName: r'status') - PetStatusEnum? get status; - // enum statusEnum { available, pending, sold, }; - - Pet._(); - - @BuiltValueHook(initializeBuilder: true) - static void _defaults(PetBuilder b) => b; - - factory Pet([void updates(PetBuilder b)]) = _$Pet; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$PetSerializer(); -} - -class _$PetSerializer implements StructuredSerializer { - @override - final Iterable types = const [Pet, _$Pet]; - - @override - final String wireName = r'Pet'; - - @override - Iterable serialize(Serializers serializers, Pet object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.id != null) { - result - ..add(r'id') - ..add(serializers.serialize(object.id, - specifiedType: const FullType(int))); - } - if (object.category != null) { - result - ..add(r'category') - ..add(serializers.serialize(object.category, - specifiedType: const FullType(Category))); - } - result - ..add(r'name') - ..add(serializers.serialize(object.name, - specifiedType: const FullType(String))); - result - ..add(r'photoUrls') - ..add(serializers.serialize(object.photoUrls, - specifiedType: const FullType(BuiltSet, [FullType(String)]))); - if (object.tags != null) { - result - ..add(r'tags') - ..add(serializers.serialize(object.tags, - specifiedType: const FullType(BuiltList, [FullType(Tag)]))); - } - if (object.status != null) { - result - ..add(r'status') - ..add(serializers.serialize(object.status, - specifiedType: const FullType(PetStatusEnum))); - } - return result; - } - - @override - Pet deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = PetBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final Object? value = iterator.current; - - switch (key) { - case r'id': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; - result.id = valueDes; - break; - case r'category': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(Category)) as Category; - result.category.replace(valueDes); - break; - case r'name': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - result.name = valueDes; - break; - case r'photoUrls': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(BuiltSet, [FullType(String)])) as BuiltSet; - result.photoUrls.replace(valueDes); - break; - case r'tags': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(Tag)])) as BuiltList; - result.tags.replace(valueDes); - break; - case r'status': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(PetStatusEnum)) as PetStatusEnum; - result.status = valueDes; - break; - } - } - return result.build(); - } -} - -class PetStatusEnum extends EnumClass { - - /// pet status in the store - @BuiltValueEnumConst(wireName: r'available') - static const PetStatusEnum available = _$petStatusEnum_available; - /// pet status in the store - @BuiltValueEnumConst(wireName: r'pending') - static const PetStatusEnum pending = _$petStatusEnum_pending; - /// pet status in the store - @BuiltValueEnumConst(wireName: r'sold') - static const PetStatusEnum sold = _$petStatusEnum_sold; - - static Serializer get serializer => _$petStatusEnumSerializer; - - const PetStatusEnum._(String name): super(name); - - static BuiltSet get values => _$petStatusEnumValues; - static PetStatusEnum valueOf(String name) => _$petStatusEnumValueOf(name); -} - diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/read_only_first.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/read_only_first.dart deleted file mode 100644 index b9f108fb625..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/read_only_first.dart +++ /dev/null @@ -1,86 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'read_only_first.g.dart'; - -/// ReadOnlyFirst -/// -/// Properties: -/// * [bar] -/// * [baz] -abstract class ReadOnlyFirst implements Built { - @BuiltValueField(wireName: r'bar') - String? get bar; - - @BuiltValueField(wireName: r'baz') - String? get baz; - - ReadOnlyFirst._(); - - @BuiltValueHook(initializeBuilder: true) - static void _defaults(ReadOnlyFirstBuilder b) => b; - - factory ReadOnlyFirst([void updates(ReadOnlyFirstBuilder b)]) = _$ReadOnlyFirst; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$ReadOnlyFirstSerializer(); -} - -class _$ReadOnlyFirstSerializer implements StructuredSerializer { - @override - final Iterable types = const [ReadOnlyFirst, _$ReadOnlyFirst]; - - @override - final String wireName = r'ReadOnlyFirst'; - - @override - Iterable serialize(Serializers serializers, ReadOnlyFirst object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.bar != null) { - result - ..add(r'bar') - ..add(serializers.serialize(object.bar, - specifiedType: const FullType(String))); - } - if (object.baz != null) { - result - ..add(r'baz') - ..add(serializers.serialize(object.baz, - specifiedType: const FullType(String))); - } - return result; - } - - @override - ReadOnlyFirst deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = ReadOnlyFirstBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final Object? value = iterator.current; - - switch (key) { - case r'bar': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - result.bar = valueDes; - break; - case r'baz': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - result.baz = valueDes; - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/special_model_name.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/special_model_name.dart deleted file mode 100644 index dcfe12bb066..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/special_model_name.dart +++ /dev/null @@ -1,71 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'special_model_name.g.dart'; - -/// SpecialModelName -/// -/// Properties: -/// * [dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket] -abstract class SpecialModelName implements Built { - @BuiltValueField(wireName: r'$special[property.name]') - int? get dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket; - - SpecialModelName._(); - - @BuiltValueHook(initializeBuilder: true) - static void _defaults(SpecialModelNameBuilder b) => b; - - factory SpecialModelName([void updates(SpecialModelNameBuilder b)]) = _$SpecialModelName; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$SpecialModelNameSerializer(); -} - -class _$SpecialModelNameSerializer implements StructuredSerializer { - @override - final Iterable types = const [SpecialModelName, _$SpecialModelName]; - - @override - final String wireName = r'SpecialModelName'; - - @override - Iterable serialize(Serializers serializers, SpecialModelName object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket != null) { - result - ..add(r'$special[property.name]') - ..add(serializers.serialize(object.dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket, - specifiedType: const FullType(int))); - } - return result; - } - - @override - SpecialModelName deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = SpecialModelNameBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final Object? value = iterator.current; - - switch (key) { - case r'$special[property.name]': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; - result.dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket = valueDes; - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/tag.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/tag.dart deleted file mode 100644 index 5a7ed38d94c..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/tag.dart +++ /dev/null @@ -1,86 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'tag.g.dart'; - -/// Tag -/// -/// Properties: -/// * [id] -/// * [name] -abstract class Tag implements Built { - @BuiltValueField(wireName: r'id') - int? get id; - - @BuiltValueField(wireName: r'name') - String? get name; - - Tag._(); - - @BuiltValueHook(initializeBuilder: true) - static void _defaults(TagBuilder b) => b; - - factory Tag([void updates(TagBuilder b)]) = _$Tag; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$TagSerializer(); -} - -class _$TagSerializer implements StructuredSerializer { - @override - final Iterable types = const [Tag, _$Tag]; - - @override - final String wireName = r'Tag'; - - @override - Iterable serialize(Serializers serializers, Tag object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.id != null) { - result - ..add(r'id') - ..add(serializers.serialize(object.id, - specifiedType: const FullType(int))); - } - if (object.name != null) { - result - ..add(r'name') - ..add(serializers.serialize(object.name, - specifiedType: const FullType(String))); - } - return result; - } - - @override - Tag deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = TagBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final Object? value = iterator.current; - - switch (key) { - case r'id': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; - result.id = valueDes; - break; - case r'name': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - result.name = valueDes; - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/user.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/user.dart deleted file mode 100644 index d590c20bdc7..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/user.dart +++ /dev/null @@ -1,177 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'user.g.dart'; - -/// User -/// -/// Properties: -/// * [id] -/// * [username] -/// * [firstName] -/// * [lastName] -/// * [email] -/// * [password] -/// * [phone] -/// * [userStatus] - User Status -abstract class User implements Built { - @BuiltValueField(wireName: r'id') - int? get id; - - @BuiltValueField(wireName: r'username') - String? get username; - - @BuiltValueField(wireName: r'firstName') - String? get firstName; - - @BuiltValueField(wireName: r'lastName') - String? get lastName; - - @BuiltValueField(wireName: r'email') - String? get email; - - @BuiltValueField(wireName: r'password') - String? get password; - - @BuiltValueField(wireName: r'phone') - String? get phone; - - /// User Status - @BuiltValueField(wireName: r'userStatus') - int? get userStatus; - - User._(); - - @BuiltValueHook(initializeBuilder: true) - static void _defaults(UserBuilder b) => b; - - factory User([void updates(UserBuilder b)]) = _$User; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$UserSerializer(); -} - -class _$UserSerializer implements StructuredSerializer { - @override - final Iterable types = const [User, _$User]; - - @override - final String wireName = r'User'; - - @override - Iterable serialize(Serializers serializers, User object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.id != null) { - result - ..add(r'id') - ..add(serializers.serialize(object.id, - specifiedType: const FullType(int))); - } - if (object.username != null) { - result - ..add(r'username') - ..add(serializers.serialize(object.username, - specifiedType: const FullType(String))); - } - if (object.firstName != null) { - result - ..add(r'firstName') - ..add(serializers.serialize(object.firstName, - specifiedType: const FullType(String))); - } - if (object.lastName != null) { - result - ..add(r'lastName') - ..add(serializers.serialize(object.lastName, - specifiedType: const FullType(String))); - } - if (object.email != null) { - result - ..add(r'email') - ..add(serializers.serialize(object.email, - specifiedType: const FullType(String))); - } - if (object.password != null) { - result - ..add(r'password') - ..add(serializers.serialize(object.password, - specifiedType: const FullType(String))); - } - if (object.phone != null) { - result - ..add(r'phone') - ..add(serializers.serialize(object.phone, - specifiedType: const FullType(String))); - } - if (object.userStatus != null) { - result - ..add(r'userStatus') - ..add(serializers.serialize(object.userStatus, - specifiedType: const FullType(int))); - } - return result; - } - - @override - User deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = UserBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final Object? value = iterator.current; - - switch (key) { - case r'id': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; - result.id = valueDes; - break; - case r'username': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - result.username = valueDes; - break; - case r'firstName': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - result.firstName = valueDes; - break; - case r'lastName': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - result.lastName = valueDes; - break; - case r'email': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - result.email = valueDes; - break; - case r'password': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - result.password = valueDes; - break; - case r'phone': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - result.phone = valueDes; - break; - case r'userStatus': - final valueDes = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; - result.userStatus = valueDes; - break; - } - } - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/serializers.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/serializers.dart deleted file mode 100644 index 5ee82d7b501..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/serializers.dart +++ /dev/null @@ -1,146 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -// ignore_for_file: unused_import - -import 'package:built_collection/built_collection.dart'; -import 'package:built_value/json_object.dart'; -import 'package:built_value/serializer.dart'; -import 'package:built_value/standard_json_plugin.dart'; -import 'package:built_value/iso_8601_date_time_serializer.dart'; -import 'package:openapi/src/date_serializer.dart'; -import 'package:openapi/src/model/date.dart'; - -import 'package:openapi/src/model/additional_properties_class.dart'; -import 'package:openapi/src/model/animal.dart'; -import 'package:openapi/src/model/api_response.dart'; -import 'package:openapi/src/model/array_of_array_of_number_only.dart'; -import 'package:openapi/src/model/array_of_number_only.dart'; -import 'package:openapi/src/model/array_test.dart'; -import 'package:openapi/src/model/capitalization.dart'; -import 'package:openapi/src/model/cat.dart'; -import 'package:openapi/src/model/cat_all_of.dart'; -import 'package:openapi/src/model/category.dart'; -import 'package:openapi/src/model/class_model.dart'; -import 'package:openapi/src/model/deprecated_object.dart'; -import 'package:openapi/src/model/dog.dart'; -import 'package:openapi/src/model/dog_all_of.dart'; -import 'package:openapi/src/model/enum_arrays.dart'; -import 'package:openapi/src/model/enum_test.dart'; -import 'package:openapi/src/model/file_schema_test_class.dart'; -import 'package:openapi/src/model/foo.dart'; -import 'package:openapi/src/model/format_test.dart'; -import 'package:openapi/src/model/has_only_read_only.dart'; -import 'package:openapi/src/model/health_check_result.dart'; -import 'package:openapi/src/model/inline_response_default.dart'; -import 'package:openapi/src/model/map_test.dart'; -import 'package:openapi/src/model/mixed_properties_and_additional_properties_class.dart'; -import 'package:openapi/src/model/model200_response.dart'; -import 'package:openapi/src/model/model_client.dart'; -import 'package:openapi/src/model/model_enum_class.dart'; -import 'package:openapi/src/model/model_file.dart'; -import 'package:openapi/src/model/model_list.dart'; -import 'package:openapi/src/model/model_return.dart'; -import 'package:openapi/src/model/name.dart'; -import 'package:openapi/src/model/nullable_class.dart'; -import 'package:openapi/src/model/number_only.dart'; -import 'package:openapi/src/model/object_with_deprecated_fields.dart'; -import 'package:openapi/src/model/order.dart'; -import 'package:openapi/src/model/outer_composite.dart'; -import 'package:openapi/src/model/outer_enum.dart'; -import 'package:openapi/src/model/outer_enum_default_value.dart'; -import 'package:openapi/src/model/outer_enum_integer.dart'; -import 'package:openapi/src/model/outer_enum_integer_default_value.dart'; -import 'package:openapi/src/model/outer_object_with_enum_property.dart'; -import 'package:openapi/src/model/pet.dart'; -import 'package:openapi/src/model/read_only_first.dart'; -import 'package:openapi/src/model/special_model_name.dart'; -import 'package:openapi/src/model/tag.dart'; -import 'package:openapi/src/model/user.dart'; - -part 'serializers.g.dart'; - -@SerializersFor([ - AdditionalPropertiesClass, - Animal, - ApiResponse, - ArrayOfArrayOfNumberOnly, - ArrayOfNumberOnly, - ArrayTest, - Capitalization, - Cat, - CatAllOf, - Category, - ClassModel, - DeprecatedObject, - Dog, - DogAllOf, - EnumArrays, - EnumTest, - FileSchemaTestClass, - Foo, - FormatTest, - HasOnlyReadOnly, - HealthCheckResult, - InlineResponseDefault, - MapTest, - MixedPropertiesAndAdditionalPropertiesClass, - Model200Response, - ModelClient, - ModelEnumClass, - ModelFile, - ModelList, - ModelReturn, - Name, - NullableClass, - NumberOnly, - ObjectWithDeprecatedFields, - Order, - OuterComposite, - OuterEnum, - OuterEnumDefaultValue, - OuterEnumInteger, - OuterEnumIntegerDefaultValue, - OuterObjectWithEnumProperty, - Pet, - ReadOnlyFirst, - SpecialModelName, - Tag, - User, -]) -Serializers serializers = (_$serializers.toBuilder() - ..addBuilderFactory( - const FullType(BuiltMap, [FullType(String), FullType(String)]), - () => MapBuilder(), - ) - ..addBuilderFactory( - const FullType(BuiltList, [FullType(User)]), - () => ListBuilder(), - ) - ..addBuilderFactory( - const FullType(BuiltSet, [FullType(String)]), - () => SetBuilder(), - ) - ..addBuilderFactory( - const FullType(BuiltSet, [FullType(Pet)]), - () => SetBuilder(), - ) - ..addBuilderFactory( - const FullType(BuiltList, [FullType(Pet)]), - () => ListBuilder(), - ) - ..addBuilderFactory( - const FullType(BuiltMap, [FullType(String), FullType(int)]), - () => MapBuilder(), - ) - ..addBuilderFactory( - const FullType(BuiltList, [FullType(String)]), - () => ListBuilder(), - ) - ..add(const DateSerializer()) - ..add(Iso8601DateTimeSerializer())) - .build(); - -Serializers standardSerializers = - (serializers.toBuilder()..addPlugin(StandardJsonPlugin())).build(); diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/pom.xml b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/pom.xml deleted file mode 100644 index 6963cf3c0f9..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/pom.xml +++ /dev/null @@ -1,88 +0,0 @@ - - 4.0.0 - org.openapitools - DartDioNextDioHttpPetstoreClientLibFakeTests - pom - 1.0.0-SNAPSHOT - DartDioNext DioHttp Petstore Client Lib Fake - - - - maven-dependency-plugin - - - package - - copy-dependencies - - - ${project.build.directory} - - - - - - org.codehaus.mojo - exec-maven-plugin - 1.2.1 - - - pub-get - pre-integration-test - - exec - - - pub - - get - - - - - pub-run-build-runner - pre-integration-test - - exec - - - pub - - run - build_runner - build - - - - - dart-analyze - integration-test - - exec - - - dart - - analyze - --fatal-infos - - - - - dart-test - integration-test - - exec - - - dart - - test - - - - - - - - diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/pubspec.yaml b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/pubspec.yaml deleted file mode 100644 index 1ba7418109e..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/pubspec.yaml +++ /dev/null @@ -1,17 +0,0 @@ -name: openapi -version: 1.0.0 -description: OpenAPI API client -homepage: homepage - -environment: - sdk: '>=2.12.0 <3.0.0' - -dependencies: - dio_http: '>=5.0.0 <6.0.0' - built_value: '>=8.1.0 <9.0.0' - built_collection: '>=5.1.0 <6.0.0' - -dev_dependencies: - built_value_generator: '>=8.1.0 <9.0.0' - build_runner: any - test: '>=1.16.0 <1.17.0' diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/additional_properties_class_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/additional_properties_class_test.dart deleted file mode 100644 index c231e6dc280..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/additional_properties_class_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -import 'package:test/test.dart'; -import 'package:openapi/openapi.dart'; - -// tests for AdditionalPropertiesClass -void main() { - final instance = AdditionalPropertiesClassBuilder(); - // TODO add properties to the builder and call build() - - group(AdditionalPropertiesClass, () { - // BuiltMap mapProperty - test('to test the property `mapProperty`', () async { - // TODO - }); - - // BuiltMap> mapOfMapProperty - test('to test the property `mapOfMapProperty`', () async { - // TODO - }); - - }); -} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/animal_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/animal_test.dart deleted file mode 100644 index 875bb42a106..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/animal_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -import 'package:test/test.dart'; -import 'package:openapi/openapi.dart'; - -// tests for Animal -void main() { - final instance = AnimalBuilder(); - // TODO add properties to the builder and call build() - - group(Animal, () { - // String className - test('to test the property `className`', () async { - // TODO - }); - - // String color (default value: 'red') - test('to test the property `color`', () async { - // TODO - }); - - }); -} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/another_fake_api_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/another_fake_api_test.dart deleted file mode 100644 index ddafef2a831..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/another_fake_api_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -import 'package:test/test.dart'; -import 'package:openapi/openapi.dart'; - - -/// tests for AnotherFakeApi -void main() { - final instance = Openapi().getAnotherFakeApi(); - - group(AnotherFakeApi, () { - // To test special tags - // - // To test special tags and operation ID starting with number - // - //Future call123testSpecialTags(ModelClient modelClient) async - test('test call123testSpecialTags', () async { - // TODO - }); - - }); -} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/api_response_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/api_response_test.dart deleted file mode 100644 index cf1a744cd62..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/api_response_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -import 'package:test/test.dart'; -import 'package:openapi/openapi.dart'; - -// tests for ApiResponse -void main() { - final instance = ApiResponseBuilder(); - // TODO add properties to the builder and call build() - - group(ApiResponse, () { - // int code - test('to test the property `code`', () async { - // TODO - }); - - // String type - test('to test the property `type`', () async { - // TODO - }); - - // String message - test('to test the property `message`', () async { - // TODO - }); - - }); -} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/array_of_array_of_number_only_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/array_of_array_of_number_only_test.dart deleted file mode 100644 index a679a6c4223..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/array_of_array_of_number_only_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -import 'package:test/test.dart'; -import 'package:openapi/openapi.dart'; - -// tests for ArrayOfArrayOfNumberOnly -void main() { - final instance = ArrayOfArrayOfNumberOnlyBuilder(); - // TODO add properties to the builder and call build() - - group(ArrayOfArrayOfNumberOnly, () { - // BuiltList> arrayArrayNumber - test('to test the property `arrayArrayNumber`', () async { - // TODO - }); - - }); -} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/array_of_number_only_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/array_of_number_only_test.dart deleted file mode 100644 index cc648bc115c..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/array_of_number_only_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -import 'package:test/test.dart'; -import 'package:openapi/openapi.dart'; - -// tests for ArrayOfNumberOnly -void main() { - final instance = ArrayOfNumberOnlyBuilder(); - // TODO add properties to the builder and call build() - - group(ArrayOfNumberOnly, () { - // BuiltList arrayNumber - test('to test the property `arrayNumber`', () async { - // TODO - }); - - }); -} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/array_test_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/array_test_test.dart deleted file mode 100644 index 210216f224b..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/array_test_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -import 'package:test/test.dart'; -import 'package:openapi/openapi.dart'; - -// tests for ArrayTest -void main() { - final instance = ArrayTestBuilder(); - // TODO add properties to the builder and call build() - - group(ArrayTest, () { - // BuiltList arrayOfString - test('to test the property `arrayOfString`', () async { - // TODO - }); - - // BuiltList> arrayArrayOfInteger - test('to test the property `arrayArrayOfInteger`', () async { - // TODO - }); - - // BuiltList> arrayArrayOfModel - test('to test the property `arrayArrayOfModel`', () async { - // TODO - }); - - }); -} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/capitalization_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/capitalization_test.dart deleted file mode 100644 index 23e04b0001b..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/capitalization_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -import 'package:test/test.dart'; -import 'package:openapi/openapi.dart'; - -// tests for Capitalization -void main() { - final instance = CapitalizationBuilder(); - // TODO add properties to the builder and call build() - - group(Capitalization, () { - // String smallCamel - test('to test the property `smallCamel`', () async { - // TODO - }); - - // String capitalCamel - test('to test the property `capitalCamel`', () async { - // TODO - }); - - // String smallSnake - test('to test the property `smallSnake`', () async { - // TODO - }); - - // String capitalSnake - test('to test the property `capitalSnake`', () async { - // TODO - }); - - // String sCAETHFlowPoints - test('to test the property `sCAETHFlowPoints`', () async { - // TODO - }); - - // Name of the pet - // String ATT_NAME - test('to test the property `ATT_NAME`', () async { - // TODO - }); - - }); -} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/cat_all_of_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/cat_all_of_test.dart deleted file mode 100644 index afdac82ad18..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/cat_all_of_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -import 'package:test/test.dart'; -import 'package:openapi/openapi.dart'; - -// tests for CatAllOf -void main() { - final instance = CatAllOfBuilder(); - // TODO add properties to the builder and call build() - - group(CatAllOf, () { - // bool declawed - test('to test the property `declawed`', () async { - // TODO - }); - - }); -} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/cat_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/cat_test.dart deleted file mode 100644 index b8fc252acc6..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/cat_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -import 'package:test/test.dart'; -import 'package:openapi/openapi.dart'; - -// tests for Cat -void main() { - final instance = CatBuilder(); - // TODO add properties to the builder and call build() - - group(Cat, () { - // String className - test('to test the property `className`', () async { - // TODO - }); - - // String color (default value: 'red') - test('to test the property `color`', () async { - // TODO - }); - - // bool declawed - test('to test the property `declawed`', () async { - // TODO - }); - - }); -} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/category_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/category_test.dart deleted file mode 100644 index 70f5fb5e02a..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/category_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -import 'package:test/test.dart'; -import 'package:openapi/openapi.dart'; - -// tests for Category -void main() { - final instance = CategoryBuilder(); - // TODO add properties to the builder and call build() - - group(Category, () { - // int id - test('to test the property `id`', () async { - // TODO - }); - - // String name (default value: 'default-name') - test('to test the property `name`', () async { - // TODO - }); - - }); -} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/class_model_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/class_model_test.dart deleted file mode 100644 index 92f95f186c9..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/class_model_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -import 'package:test/test.dart'; -import 'package:openapi/openapi.dart'; - -// tests for ClassModel -void main() { - final instance = ClassModelBuilder(); - // TODO add properties to the builder and call build() - - group(ClassModel, () { - // String class_ - test('to test the property `class_`', () async { - // TODO - }); - - }); -} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/default_api_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/default_api_test.dart deleted file mode 100644 index eef4c41652e..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/default_api_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -import 'package:test/test.dart'; -import 'package:openapi/openapi.dart'; - - -/// tests for DefaultApi -void main() { - final instance = Openapi().getDefaultApi(); - - group(DefaultApi, () { - //Future fooGet() async - test('test fooGet', () async { - // TODO - }); - - }); -} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/deprecated_object_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/deprecated_object_test.dart deleted file mode 100644 index 98ab991b2b1..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/deprecated_object_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -import 'package:test/test.dart'; -import 'package:openapi/openapi.dart'; - -// tests for DeprecatedObject -void main() { - final instance = DeprecatedObjectBuilder(); - // TODO add properties to the builder and call build() - - group(DeprecatedObject, () { - // String name - test('to test the property `name`', () async { - // TODO - }); - - }); -} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/dog_all_of_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/dog_all_of_test.dart deleted file mode 100644 index 7b58b3a2755..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/dog_all_of_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -import 'package:test/test.dart'; -import 'package:openapi/openapi.dart'; - -// tests for DogAllOf -void main() { - final instance = DogAllOfBuilder(); - // TODO add properties to the builder and call build() - - group(DogAllOf, () { - // String breed - test('to test the property `breed`', () async { - // TODO - }); - - }); -} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/dog_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/dog_test.dart deleted file mode 100644 index f57fcdc413d..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/dog_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -import 'package:test/test.dart'; -import 'package:openapi/openapi.dart'; - -// tests for Dog -void main() { - final instance = DogBuilder(); - // TODO add properties to the builder and call build() - - group(Dog, () { - // String className - test('to test the property `className`', () async { - // TODO - }); - - // String color (default value: 'red') - test('to test the property `color`', () async { - // TODO - }); - - // String breed - test('to test the property `breed`', () async { - // TODO - }); - - }); -} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/enum_arrays_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/enum_arrays_test.dart deleted file mode 100644 index 438c36db074..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/enum_arrays_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -import 'package:test/test.dart'; -import 'package:openapi/openapi.dart'; - -// tests for EnumArrays -void main() { - final instance = EnumArraysBuilder(); - // TODO add properties to the builder and call build() - - group(EnumArrays, () { - // String justSymbol - test('to test the property `justSymbol`', () async { - // TODO - }); - - // BuiltList arrayEnum - test('to test the property `arrayEnum`', () async { - // TODO - }); - - }); -} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/enum_test_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/enum_test_test.dart deleted file mode 100644 index b5f3aeb7fbd..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/enum_test_test.dart +++ /dev/null @@ -1,51 +0,0 @@ -import 'package:test/test.dart'; -import 'package:openapi/openapi.dart'; - -// tests for EnumTest -void main() { - final instance = EnumTestBuilder(); - // TODO add properties to the builder and call build() - - group(EnumTest, () { - // String enumString - test('to test the property `enumString`', () async { - // TODO - }); - - // String enumStringRequired - test('to test the property `enumStringRequired`', () async { - // TODO - }); - - // int enumInteger - test('to test the property `enumInteger`', () async { - // TODO - }); - - // double enumNumber - test('to test the property `enumNumber`', () async { - // TODO - }); - - // OuterEnum outerEnum - test('to test the property `outerEnum`', () async { - // TODO - }); - - // OuterEnumInteger outerEnumInteger - test('to test the property `outerEnumInteger`', () async { - // TODO - }); - - // OuterEnumDefaultValue outerEnumDefaultValue - test('to test the property `outerEnumDefaultValue`', () async { - // TODO - }); - - // OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue - test('to test the property `outerEnumIntegerDefaultValue`', () async { - // TODO - }); - - }); -} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/fake_api_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/fake_api_test.dart deleted file mode 100644 index 1eff7d0447b..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/fake_api_test.dart +++ /dev/null @@ -1,136 +0,0 @@ -import 'package:test/test.dart'; -import 'package:openapi/openapi.dart'; - - -/// tests for FakeApi -void main() { - final instance = Openapi().getFakeApi(); - - group(FakeApi, () { - // Health check endpoint - // - //Future fakeHealthGet() async - test('test fakeHealthGet', () async { - // TODO - }); - - // test http signature authentication - // - //Future fakeHttpSignatureTest(Pet pet, { String query1, String header1 }) async - test('test fakeHttpSignatureTest', () async { - // TODO - }); - - // Test serialization of outer boolean types - // - //Future fakeOuterBooleanSerialize({ bool body }) async - test('test fakeOuterBooleanSerialize', () async { - // TODO - }); - - // Test serialization of object with outer number type - // - //Future fakeOuterCompositeSerialize({ OuterComposite outerComposite }) async - test('test fakeOuterCompositeSerialize', () async { - // TODO - }); - - // Test serialization of outer number types - // - //Future fakeOuterNumberSerialize({ num body }) async - test('test fakeOuterNumberSerialize', () async { - // TODO - }); - - // Test serialization of outer string types - // - //Future fakeOuterStringSerialize({ String body }) async - test('test fakeOuterStringSerialize', () async { - // TODO - }); - - // Test serialization of enum (int) properties with examples - // - //Future fakePropertyEnumIntegerSerialize(OuterObjectWithEnumProperty outerObjectWithEnumProperty) async - test('test fakePropertyEnumIntegerSerialize', () async { - // TODO - }); - - // For this test, the body has to be a binary file. - // - //Future testBodyWithBinary(MultipartFile body) async - test('test testBodyWithBinary', () async { - // TODO - }); - - // For this test, the body for this request must reference a schema named `File`. - // - //Future testBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass) async - test('test testBodyWithFileSchema', () async { - // TODO - }); - - //Future testBodyWithQueryParams(String query, User user) async - test('test testBodyWithQueryParams', () async { - // TODO - }); - - // To test \"client\" model - // - // To test \"client\" model - // - //Future testClientModel(ModelClient modelClient) async - test('test testClientModel', () async { - // TODO - }); - - // Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - // - // Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - // - //Future testEndpointParameters(num number, double double_, String patternWithoutDelimiter, String byte, { int integer, int int32, int int64, double float, String string, Uint8List binary, Date date, DateTime dateTime, String password, String callback }) async - test('test testEndpointParameters', () async { - // TODO - }); - - // To test enum parameters - // - // To test enum parameters - // - //Future testEnumParameters({ BuiltList enumHeaderStringArray, String enumHeaderString, BuiltList enumQueryStringArray, String enumQueryString, int enumQueryInteger, double enumQueryDouble, BuiltList enumFormStringArray, String enumFormString }) async - test('test testEnumParameters', () async { - // TODO - }); - - // Fake endpoint to test group parameters (optional) - // - // Fake endpoint to test group parameters (optional) - // - //Future testGroupParameters(int requiredStringGroup, bool requiredBooleanGroup, int requiredInt64Group, { int stringGroup, bool booleanGroup, int int64Group }) async - test('test testGroupParameters', () async { - // TODO - }); - - // test inline additionalProperties - // - //Future testInlineAdditionalProperties(BuiltMap requestBody) async - test('test testInlineAdditionalProperties', () async { - // TODO - }); - - // test json serialization of form data - // - //Future testJsonFormData(String param, String param2) async - test('test testJsonFormData', () async { - // TODO - }); - - // To test the collection format in query parameters - // - //Future testQueryParameterCollectionFormat(BuiltList pipe, BuiltList ioutil, BuiltList http, BuiltList url, BuiltList context, String allowEmpty, { BuiltMap language }) async - test('test testQueryParameterCollectionFormat', () async { - // TODO - }); - - }); -} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/fake_classname_tags123_api_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/fake_classname_tags123_api_test.dart deleted file mode 100644 index 3075147f52f..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/fake_classname_tags123_api_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -import 'package:test/test.dart'; -import 'package:openapi/openapi.dart'; - - -/// tests for FakeClassnameTags123Api -void main() { - final instance = Openapi().getFakeClassnameTags123Api(); - - group(FakeClassnameTags123Api, () { - // To test class name in snake case - // - // To test class name in snake case - // - //Future testClassname(ModelClient modelClient) async - test('test testClassname', () async { - // TODO - }); - - }); -} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/file_schema_test_class_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/file_schema_test_class_test.dart deleted file mode 100644 index ca8695bd4a4..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/file_schema_test_class_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -import 'package:test/test.dart'; -import 'package:openapi/openapi.dart'; - -// tests for FileSchemaTestClass -void main() { - final instance = FileSchemaTestClassBuilder(); - // TODO add properties to the builder and call build() - - group(FileSchemaTestClass, () { - // ModelFile file - test('to test the property `file`', () async { - // TODO - }); - - // BuiltList files - test('to test the property `files`', () async { - // TODO - }); - - }); -} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/foo_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/foo_test.dart deleted file mode 100644 index 205237788ae..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/foo_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -import 'package:test/test.dart'; -import 'package:openapi/openapi.dart'; - -// tests for Foo -void main() { - final instance = FooBuilder(); - // TODO add properties to the builder and call build() - - group(Foo, () { - // String bar (default value: 'bar') - test('to test the property `bar`', () async { - // TODO - }); - - }); -} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/format_test_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/format_test_test.dart deleted file mode 100644 index 558c3aa4b65..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/format_test_test.dart +++ /dev/null @@ -1,93 +0,0 @@ -import 'package:test/test.dart'; -import 'package:openapi/openapi.dart'; - -// tests for FormatTest -void main() { - final instance = FormatTestBuilder(); - // TODO add properties to the builder and call build() - - group(FormatTest, () { - // int integer - test('to test the property `integer`', () async { - // TODO - }); - - // int int32 - test('to test the property `int32`', () async { - // TODO - }); - - // int int64 - test('to test the property `int64`', () async { - // TODO - }); - - // num number - test('to test the property `number`', () async { - // TODO - }); - - // double float - test('to test the property `float`', () async { - // TODO - }); - - // double double_ - test('to test the property `double_`', () async { - // TODO - }); - - // double decimal - test('to test the property `decimal`', () async { - // TODO - }); - - // String string - test('to test the property `string`', () async { - // TODO - }); - - // String byte - test('to test the property `byte`', () async { - // TODO - }); - - // Uint8List binary - test('to test the property `binary`', () async { - // TODO - }); - - // Date date - test('to test the property `date`', () async { - // TODO - }); - - // DateTime dateTime - test('to test the property `dateTime`', () async { - // TODO - }); - - // String uuid - test('to test the property `uuid`', () async { - // TODO - }); - - // String password - test('to test the property `password`', () async { - // TODO - }); - - // A string that is a 10 digit number. Can have leading zeros. - // String patternWithDigits - test('to test the property `patternWithDigits`', () async { - // TODO - }); - - // A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. - // String patternWithDigitsAndDelimiter - test('to test the property `patternWithDigitsAndDelimiter`', () async { - // TODO - }); - - }); -} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/has_only_read_only_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/has_only_read_only_test.dart deleted file mode 100644 index c3452221475..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/has_only_read_only_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -import 'package:test/test.dart'; -import 'package:openapi/openapi.dart'; - -// tests for HasOnlyReadOnly -void main() { - final instance = HasOnlyReadOnlyBuilder(); - // TODO add properties to the builder and call build() - - group(HasOnlyReadOnly, () { - // String bar - test('to test the property `bar`', () async { - // TODO - }); - - // String foo - test('to test the property `foo`', () async { - // TODO - }); - - }); -} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/health_check_result_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/health_check_result_test.dart deleted file mode 100644 index fda0c921821..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/health_check_result_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -import 'package:test/test.dart'; -import 'package:openapi/openapi.dart'; - -// tests for HealthCheckResult -void main() { - final instance = HealthCheckResultBuilder(); - // TODO add properties to the builder and call build() - - group(HealthCheckResult, () { - // String nullableMessage - test('to test the property `nullableMessage`', () async { - // TODO - }); - - }); -} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/inline_response_default_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/inline_response_default_test.dart deleted file mode 100644 index 56fbf1d0b1a..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/inline_response_default_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -import 'package:test/test.dart'; -import 'package:openapi/openapi.dart'; - -// tests for InlineResponseDefault -void main() { - final instance = InlineResponseDefaultBuilder(); - // TODO add properties to the builder and call build() - - group(InlineResponseDefault, () { - // Foo string - test('to test the property `string`', () async { - // TODO - }); - - }); -} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/map_test_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/map_test_test.dart deleted file mode 100644 index 56a27610ee5..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/map_test_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -import 'package:test/test.dart'; -import 'package:openapi/openapi.dart'; - -// tests for MapTest -void main() { - final instance = MapTestBuilder(); - // TODO add properties to the builder and call build() - - group(MapTest, () { - // BuiltMap> mapMapOfString - test('to test the property `mapMapOfString`', () async { - // TODO - }); - - // BuiltMap mapOfEnumString - test('to test the property `mapOfEnumString`', () async { - // TODO - }); - - // BuiltMap directMap - test('to test the property `directMap`', () async { - // TODO - }); - - // BuiltMap indirectMap - test('to test the property `indirectMap`', () async { - // TODO - }); - - }); -} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/mixed_properties_and_additional_properties_class_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/mixed_properties_and_additional_properties_class_test.dart deleted file mode 100644 index 85b113387a0..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/mixed_properties_and_additional_properties_class_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -import 'package:test/test.dart'; -import 'package:openapi/openapi.dart'; - -// tests for MixedPropertiesAndAdditionalPropertiesClass -void main() { - final instance = MixedPropertiesAndAdditionalPropertiesClassBuilder(); - // TODO add properties to the builder and call build() - - group(MixedPropertiesAndAdditionalPropertiesClass, () { - // String uuid - test('to test the property `uuid`', () async { - // TODO - }); - - // DateTime dateTime - test('to test the property `dateTime`', () async { - // TODO - }); - - // BuiltMap map - test('to test the property `map`', () async { - // TODO - }); - - }); -} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/model200_response_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/model200_response_test.dart deleted file mode 100644 index 39ff6ec59c0..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/model200_response_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -import 'package:test/test.dart'; -import 'package:openapi/openapi.dart'; - -// tests for Model200Response -void main() { - final instance = Model200ResponseBuilder(); - // TODO add properties to the builder and call build() - - group(Model200Response, () { - // int name - test('to test the property `name`', () async { - // TODO - }); - - // String class_ - test('to test the property `class_`', () async { - // TODO - }); - - }); -} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/model_client_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/model_client_test.dart deleted file mode 100644 index f494dfd0849..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/model_client_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -import 'package:test/test.dart'; -import 'package:openapi/openapi.dart'; - -// tests for ModelClient -void main() { - final instance = ModelClientBuilder(); - // TODO add properties to the builder and call build() - - group(ModelClient, () { - // String client - test('to test the property `client`', () async { - // TODO - }); - - }); -} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/model_enum_class_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/model_enum_class_test.dart deleted file mode 100644 index 03e5855bf00..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/model_enum_class_test.dart +++ /dev/null @@ -1,9 +0,0 @@ -import 'package:test/test.dart'; -import 'package:openapi/openapi.dart'; - -// tests for ModelEnumClass -void main() { - - group(ModelEnumClass, () { - }); -} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/model_file_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/model_file_test.dart deleted file mode 100644 index 4f139772622..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/model_file_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:test/test.dart'; -import 'package:openapi/openapi.dart'; - -// tests for ModelFile -void main() { - final instance = ModelFileBuilder(); - // TODO add properties to the builder and call build() - - group(ModelFile, () { - // Test capitalization - // String sourceURI - test('to test the property `sourceURI`', () async { - // TODO - }); - - }); -} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/model_list_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/model_list_test.dart deleted file mode 100644 index d35e02fe0c9..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/model_list_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -import 'package:test/test.dart'; -import 'package:openapi/openapi.dart'; - -// tests for ModelList -void main() { - final instance = ModelListBuilder(); - // TODO add properties to the builder and call build() - - group(ModelList, () { - // String n123list - test('to test the property `n123list`', () async { - // TODO - }); - - }); -} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/model_return_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/model_return_test.dart deleted file mode 100644 index eedfe7eb281..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/model_return_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -import 'package:test/test.dart'; -import 'package:openapi/openapi.dart'; - -// tests for ModelReturn -void main() { - final instance = ModelReturnBuilder(); - // TODO add properties to the builder and call build() - - group(ModelReturn, () { - // int return_ - test('to test the property `return_`', () async { - // TODO - }); - - }); -} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/name_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/name_test.dart deleted file mode 100644 index 6b2329bb081..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/name_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -import 'package:test/test.dart'; -import 'package:openapi/openapi.dart'; - -// tests for Name -void main() { - final instance = NameBuilder(); - // TODO add properties to the builder and call build() - - group(Name, () { - // int name - test('to test the property `name`', () async { - // TODO - }); - - // int snakeCase - test('to test the property `snakeCase`', () async { - // TODO - }); - - // String property - test('to test the property `property`', () async { - // TODO - }); - - // int n123number - test('to test the property `n123number`', () async { - // TODO - }); - - }); -} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/nullable_class_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/nullable_class_test.dart deleted file mode 100644 index 1a6767dbb2a..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/nullable_class_test.dart +++ /dev/null @@ -1,71 +0,0 @@ -import 'package:test/test.dart'; -import 'package:openapi/openapi.dart'; - -// tests for NullableClass -void main() { - final instance = NullableClassBuilder(); - // TODO add properties to the builder and call build() - - group(NullableClass, () { - // int integerProp - test('to test the property `integerProp`', () async { - // TODO - }); - - // num numberProp - test('to test the property `numberProp`', () async { - // TODO - }); - - // bool booleanProp - test('to test the property `booleanProp`', () async { - // TODO - }); - - // String stringProp - test('to test the property `stringProp`', () async { - // TODO - }); - - // Date dateProp - test('to test the property `dateProp`', () async { - // TODO - }); - - // DateTime datetimeProp - test('to test the property `datetimeProp`', () async { - // TODO - }); - - // BuiltList arrayNullableProp - test('to test the property `arrayNullableProp`', () async { - // TODO - }); - - // BuiltList arrayAndItemsNullableProp - test('to test the property `arrayAndItemsNullableProp`', () async { - // TODO - }); - - // BuiltList arrayItemsNullable - test('to test the property `arrayItemsNullable`', () async { - // TODO - }); - - // BuiltMap objectNullableProp - test('to test the property `objectNullableProp`', () async { - // TODO - }); - - // BuiltMap objectAndItemsNullableProp - test('to test the property `objectAndItemsNullableProp`', () async { - // TODO - }); - - // BuiltMap objectItemsNullable - test('to test the property `objectItemsNullable`', () async { - // TODO - }); - - }); -} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/number_only_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/number_only_test.dart deleted file mode 100644 index 7167d78a496..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/number_only_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -import 'package:test/test.dart'; -import 'package:openapi/openapi.dart'; - -// tests for NumberOnly -void main() { - final instance = NumberOnlyBuilder(); - // TODO add properties to the builder and call build() - - group(NumberOnly, () { - // num justNumber - test('to test the property `justNumber`', () async { - // TODO - }); - - }); -} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/object_with_deprecated_fields_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/object_with_deprecated_fields_test.dart deleted file mode 100644 index cd04ed4d48e..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/object_with_deprecated_fields_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -import 'package:test/test.dart'; -import 'package:openapi/openapi.dart'; - -// tests for ObjectWithDeprecatedFields -void main() { - final instance = ObjectWithDeprecatedFieldsBuilder(); - // TODO add properties to the builder and call build() - - group(ObjectWithDeprecatedFields, () { - // String uuid - test('to test the property `uuid`', () async { - // TODO - }); - - // num id - test('to test the property `id`', () async { - // TODO - }); - - // DeprecatedObject deprecatedRef - test('to test the property `deprecatedRef`', () async { - // TODO - }); - - // BuiltList bars - test('to test the property `bars`', () async { - // TODO - }); - - }); -} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/order_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/order_test.dart deleted file mode 100644 index 7ff992230bf..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/order_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -import 'package:test/test.dart'; -import 'package:openapi/openapi.dart'; - -// tests for Order -void main() { - final instance = OrderBuilder(); - // TODO add properties to the builder and call build() - - group(Order, () { - // int id - test('to test the property `id`', () async { - // TODO - }); - - // int petId - test('to test the property `petId`', () async { - // TODO - }); - - // int quantity - test('to test the property `quantity`', () async { - // TODO - }); - - // DateTime shipDate - test('to test the property `shipDate`', () async { - // TODO - }); - - // Order Status - // String status - test('to test the property `status`', () async { - // TODO - }); - - // bool complete (default value: false) - test('to test the property `complete`', () async { - // TODO - }); - - }); -} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/outer_composite_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/outer_composite_test.dart deleted file mode 100644 index dac257d9a0d..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/outer_composite_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -import 'package:test/test.dart'; -import 'package:openapi/openapi.dart'; - -// tests for OuterComposite -void main() { - final instance = OuterCompositeBuilder(); - // TODO add properties to the builder and call build() - - group(OuterComposite, () { - // num myNumber - test('to test the property `myNumber`', () async { - // TODO - }); - - // String myString - test('to test the property `myString`', () async { - // TODO - }); - - // bool myBoolean - test('to test the property `myBoolean`', () async { - // TODO - }); - - }); -} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/outer_enum_default_value_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/outer_enum_default_value_test.dart deleted file mode 100644 index 502c8326be5..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/outer_enum_default_value_test.dart +++ /dev/null @@ -1,9 +0,0 @@ -import 'package:test/test.dart'; -import 'package:openapi/openapi.dart'; - -// tests for OuterEnumDefaultValue -void main() { - - group(OuterEnumDefaultValue, () { - }); -} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/outer_enum_integer_default_value_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/outer_enum_integer_default_value_test.dart deleted file mode 100644 index c535fe8ac35..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/outer_enum_integer_default_value_test.dart +++ /dev/null @@ -1,9 +0,0 @@ -import 'package:test/test.dart'; -import 'package:openapi/openapi.dart'; - -// tests for OuterEnumIntegerDefaultValue -void main() { - - group(OuterEnumIntegerDefaultValue, () { - }); -} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/outer_enum_integer_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/outer_enum_integer_test.dart deleted file mode 100644 index d945bc8c489..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/outer_enum_integer_test.dart +++ /dev/null @@ -1,9 +0,0 @@ -import 'package:test/test.dart'; -import 'package:openapi/openapi.dart'; - -// tests for OuterEnumInteger -void main() { - - group(OuterEnumInteger, () { - }); -} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/outer_enum_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/outer_enum_test.dart deleted file mode 100644 index 8e11eb02fb8..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/outer_enum_test.dart +++ /dev/null @@ -1,9 +0,0 @@ -import 'package:test/test.dart'; -import 'package:openapi/openapi.dart'; - -// tests for OuterEnum -void main() { - - group(OuterEnum, () { - }); -} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/outer_object_with_enum_property_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/outer_object_with_enum_property_test.dart deleted file mode 100644 index d6d763c5d93..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/outer_object_with_enum_property_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -import 'package:test/test.dart'; -import 'package:openapi/openapi.dart'; - -// tests for OuterObjectWithEnumProperty -void main() { - final instance = OuterObjectWithEnumPropertyBuilder(); - // TODO add properties to the builder and call build() - - group(OuterObjectWithEnumProperty, () { - // OuterEnumInteger value - test('to test the property `value`', () async { - // TODO - }); - - }); -} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/pet_api_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/pet_api_test.dart deleted file mode 100644 index c4bf8d69968..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/pet_api_test.dart +++ /dev/null @@ -1,80 +0,0 @@ -import 'package:test/test.dart'; -import 'package:openapi/openapi.dart'; - - -/// tests for PetApi -void main() { - final instance = Openapi().getPetApi(); - - group(PetApi, () { - // Add a new pet to the store - // - //Future addPet(Pet pet) async - test('test addPet', () async { - // TODO - }); - - // Deletes a pet - // - //Future deletePet(int petId, { String apiKey }) async - test('test deletePet', () async { - // TODO - }); - - // Finds Pets by status - // - // Multiple status values can be provided with comma separated strings - // - //Future> findPetsByStatus(BuiltList status) async - test('test findPetsByStatus', () async { - // TODO - }); - - // Finds Pets by tags - // - // Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - // - //Future> findPetsByTags(BuiltSet tags) async - test('test findPetsByTags', () async { - // TODO - }); - - // Find pet by ID - // - // Returns a single pet - // - //Future getPetById(int petId) async - test('test getPetById', () async { - // TODO - }); - - // Update an existing pet - // - //Future updatePet(Pet pet) async - test('test updatePet', () async { - // TODO - }); - - // Updates a pet in the store with form data - // - //Future updatePetWithForm(int petId, { String name, String status }) async - test('test updatePetWithForm', () async { - // TODO - }); - - // uploads an image - // - //Future uploadFile(int petId, { String additionalMetadata, MultipartFile file }) async - test('test uploadFile', () async { - // TODO - }); - - // uploads an image (required) - // - //Future uploadFileWithRequiredFile(int petId, MultipartFile requiredFile, { String additionalMetadata }) async - test('test uploadFileWithRequiredFile', () async { - // TODO - }); - - }); -} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/pet_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/pet_test.dart deleted file mode 100644 index b2bac5351d2..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/pet_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -import 'package:test/test.dart'; -import 'package:openapi/openapi.dart'; - -// tests for Pet -void main() { - final instance = PetBuilder(); - // TODO add properties to the builder and call build() - - group(Pet, () { - // int id - test('to test the property `id`', () async { - // TODO - }); - - // Category category - test('to test the property `category`', () async { - // TODO - }); - - // String name - test('to test the property `name`', () async { - // TODO - }); - - // BuiltSet photoUrls - test('to test the property `photoUrls`', () async { - // TODO - }); - - // BuiltList tags - test('to test the property `tags`', () async { - // TODO - }); - - // pet status in the store - // String status - test('to test the property `status`', () async { - // TODO - }); - - }); -} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/read_only_first_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/read_only_first_test.dart deleted file mode 100644 index 550d3d793ec..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/read_only_first_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -import 'package:test/test.dart'; -import 'package:openapi/openapi.dart'; - -// tests for ReadOnlyFirst -void main() { - final instance = ReadOnlyFirstBuilder(); - // TODO add properties to the builder and call build() - - group(ReadOnlyFirst, () { - // String bar - test('to test the property `bar`', () async { - // TODO - }); - - // String baz - test('to test the property `baz`', () async { - // TODO - }); - - }); -} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/special_model_name_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/special_model_name_test.dart deleted file mode 100644 index 08a4592a1ed..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/special_model_name_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -import 'package:test/test.dart'; -import 'package:openapi/openapi.dart'; - -// tests for SpecialModelName -void main() { - final instance = SpecialModelNameBuilder(); - // TODO add properties to the builder and call build() - - group(SpecialModelName, () { - // int dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket - test('to test the property `dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket`', () async { - // TODO - }); - - }); -} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/store_api_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/store_api_test.dart deleted file mode 100644 index 9eac725762b..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/store_api_test.dart +++ /dev/null @@ -1,45 +0,0 @@ -import 'package:test/test.dart'; -import 'package:openapi/openapi.dart'; - - -/// tests for StoreApi -void main() { - final instance = Openapi().getStoreApi(); - - group(StoreApi, () { - // Delete purchase order by ID - // - // For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - // - //Future deleteOrder(String orderId) async - test('test deleteOrder', () async { - // TODO - }); - - // Returns pet inventories by status - // - // Returns a map of status codes to quantities - // - //Future> getInventory() async - test('test getInventory', () async { - // TODO - }); - - // Find purchase order by ID - // - // For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - // - //Future getOrderById(int orderId) async - test('test getOrderById', () async { - // TODO - }); - - // Place an order for a pet - // - //Future placeOrder(Order order) async - test('test placeOrder', () async { - // TODO - }); - - }); -} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/tag_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/tag_test.dart deleted file mode 100644 index 6f7c63b8f0c..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/tag_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -import 'package:test/test.dart'; -import 'package:openapi/openapi.dart'; - -// tests for Tag -void main() { - final instance = TagBuilder(); - // TODO add properties to the builder and call build() - - group(Tag, () { - // int id - test('to test the property `id`', () async { - // TODO - }); - - // String name - test('to test the property `name`', () async { - // TODO - }); - - }); -} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/user_api_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/user_api_test.dart deleted file mode 100644 index 01eaad61fc2..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/user_api_test.dart +++ /dev/null @@ -1,73 +0,0 @@ -import 'package:test/test.dart'; -import 'package:openapi/openapi.dart'; - - -/// tests for UserApi -void main() { - final instance = Openapi().getUserApi(); - - group(UserApi, () { - // Create user - // - // This can only be done by the logged in user. - // - //Future createUser(User user) async - test('test createUser', () async { - // TODO - }); - - // Creates list of users with given input array - // - //Future createUsersWithArrayInput(BuiltList user) async - test('test createUsersWithArrayInput', () async { - // TODO - }); - - // Creates list of users with given input array - // - //Future createUsersWithListInput(BuiltList user) async - test('test createUsersWithListInput', () async { - // TODO - }); - - // Delete user - // - // This can only be done by the logged in user. - // - //Future deleteUser(String username) async - test('test deleteUser', () async { - // TODO - }); - - // Get user by user name - // - //Future getUserByName(String username) async - test('test getUserByName', () async { - // TODO - }); - - // Logs user into the system - // - //Future loginUser(String username, String password) async - test('test loginUser', () async { - // TODO - }); - - // Logs out current logged in user session - // - //Future logoutUser() async - test('test logoutUser', () async { - // TODO - }); - - // Updated user - // - // This can only be done by the logged in user. - // - //Future updateUser(String username, User user) async - test('test updateUser', () async { - // TODO - }); - - }); -} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/user_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/user_test.dart deleted file mode 100644 index 1e6a1bc23fa..00000000000 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/user_test.dart +++ /dev/null @@ -1,52 +0,0 @@ -import 'package:test/test.dart'; -import 'package:openapi/openapi.dart'; - -// tests for User -void main() { - final instance = UserBuilder(); - // TODO add properties to the builder and call build() - - group(User, () { - // int id - test('to test the property `id`', () async { - // TODO - }); - - // String username - test('to test the property `username`', () async { - // TODO - }); - - // String firstName - test('to test the property `firstName`', () async { - // TODO - }); - - // String lastName - test('to test the property `lastName`', () async { - // TODO - }); - - // String email - test('to test the property `email`', () async { - // TODO - }); - - // String password - test('to test the property `password`', () async { - // TODO - }); - - // String phone - test('to test the property `phone`', () async { - // TODO - }); - - // User Status - // int userStatus - test('to test the property `userStatus`', () async { - // TODO - }); - - }); -}