From 96375415877362aaa2507bd851da80d78acc47fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Le=20D=C3=BB?= Date: Thu, 30 Apr 2026 06:48:05 +0200 Subject: [PATCH 1/3] honor optional non-nullable in deserialize_properties `class_members.mustache` makes the Dart getter `String?` whenever `isNullable || !required` (the only sane Dart mapping: an optional field can always be observably `null`), but `deserialize_properties.mustache` only honored `isNullable`. The two templates therefore disagreed: getter was `String?` but the deserializer cast the value as non-nullable `String`, throwing `type 'Null' is not a subtype of type 'String'` the moment the API returned the field as `null`. The throw bubbled up through any enclosing container, so a single null leaf could tank the entire parent payload -- and most call paths swallowed the error silently. Fix: in `deserialize_properties.mustache` the cast and the FullType now key on the same condition as the getter: nullable when `isNullable || !required`. The null-skip guard (`if (valueDes == null) continue;`) is also extended to optional non-nullable properties so we never reach the builder assignment with a null on the wire. Required + non-nullable, required + explicitly nullable, and optional + explicitly nullable all keep their existing behavior -- only the previously-broken optional non-nullable path changes. A new fixture `built_value_optional_nullable.yaml` exercises every shape, and a new test `DartDioClientCodegenTest.testOptionalNonNullablePropertyDeserializesAsNullable` asserts the generated `watch_provider_entry.dart` contains the expected lines for each. Full Dart suite: 115 tests, 0 failures, 0 regressions. --- .../deserialize_properties.mustache | 11 ++- .../dart/dio/DartDioClientCodegenTest.java | 73 +++++++++++++++++++ .../built_value_optional_nullable.yaml | 50 +++++++++++++ 3 files changed, 131 insertions(+), 3 deletions(-) create mode 100644 modules/openapi-generator/src/test/resources/3_0/dart-dio/built_value_optional_nullable.yaml diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/deserialize_properties.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/deserialize_properties.mustache index d64ec8086c34..becdd3f40477 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/deserialize_properties.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/deserialize_properties.mustache @@ -14,11 +14,16 @@ case r'{{baseName}}': final valueDes = serializers.deserialize( value, - specifiedType: const {{>serialization/built_value/variable_serializer_type}}, - ) as {{>serialization/built_value/variable_type}}; + specifiedType: const FullType{{#isNullable}}.nullable{{/isNullable}}{{^isNullable}}{{^required}}.nullable{{/required}}{{/isNullable}}({{#isContainer}}{{baseType}}, [{{#isMap}}FullType(String), {{/isMap}}{{#items}}{{>serialization/built_value/variable_serializer_type}}{{/items}}]{{/isContainer}}{{^isContainer}}{{{datatypeWithEnum}}}{{/isContainer}}), + ) as {{#isContainer}}{{baseType}}<{{#isMap}}String, {{/isMap}}{{#items}}{{>serialization/built_value/variable_type}}{{/items}}>{{/isContainer}}{{^isContainer}}{{{datatypeWithEnum}}}{{/isContainer}}{{#isNullable}}?{{/isNullable}}{{^isNullable}}{{^required}}?{{/required}}{{/isNullable}}; {{#isNullable}} if (valueDes == null) continue; {{/isNullable}} + {{^isNullable}} + {{^required}} + if (valueDes == null) continue; + {{/required}} + {{/isNullable}} {{#isContainer}} result.{{{name}}}.replace(valueDes); {{/isContainer}} @@ -54,4 +59,4 @@ break; } } - } \ No newline at end of file + } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/dio/DartDioClientCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/dio/DartDioClientCodegenTest.java index e19857605731..42ff9cd4166e 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/dio/DartDioClientCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/dio/DartDioClientCodegenTest.java @@ -142,6 +142,79 @@ public void testImportMappingsInSerializersAndBarrelFile() throws IOException { "package:my_api/src/model/custom_address.dart"); } + /** + * Regression test for the dart-dio built_value generator's handling + * of optional non-nullable model properties. + * + * Before the fix, the generator emitted a Dart getter typed as + * {@code String?} (because in Dart, an optional field can always be + * absent, which is observably {@code null}) but the matching + * deserializer used {@code FullType(String)} and cast the result + * {@code as String}. As a consequence, the moment the JSON payload + * carried the field as an explicit {@code null} the cast threw and + * the entire enclosing object failed to deserialize -- silently in + * many call paths. + * + * The fix: in {@code deserialize_properties.mustache} the cast + * follows the same rule that {@code class_members.mustache} already + * uses for the getter type, i.e. nullable when + * {@code isNullable || !required}. This test asserts that. + */ + @Test + public void testOptionalNonNullablePropertyDeserializesAsNullable() throws IOException { + File output = Files.createTempDirectory("test").toFile(); + output.deleteOnExit(); + + final CodegenConfigurator configurator = new CodegenConfigurator() + .setGeneratorName("dart-dio") + .setInputSpec("src/test/resources/3_0/dart-dio/built_value_optional_nullable.yaml") + .setOutputDir(output.getAbsolutePath().replace("\\", "/")); + + ClientOptInput opts = configurator.toClientOptInput(); + Generator generator = new DefaultGenerator().opts(opts); + List files = generator.generate(); + files.forEach(File::deleteOnExit); + + Path widget = output.toPath().resolve("lib/src/model/widget.dart"); + + // Required fields stay strict: cast as a non-nullable type with a + // non-nullable FullType. Otherwise the existing behaviour for + // required fields would change. + TestUtils.assertFileContains(widget, + "case r'id':", + "specifiedType: const FullType(int),", + "as int;"); + TestUtils.assertFileContains(widget, + "case r'name':", + "specifiedType: const FullType(String),", + "as String;"); + + // Optional non-nullable: getter is `String?` (existing), and the + // deserializer now matches -- FullType.nullable + cast as `T?` + // + skip-on-null guard so we never reach `result.x = valueDes` + // with a null. + TestUtils.assertFileContains(widget, "String? get iconUrl;"); + TestUtils.assertFileContains(widget, + "case r'iconUrl':", + "specifiedType: const FullType.nullable(String),", + "as String?;", + "if (valueDes == null) continue;"); + + TestUtils.assertFileContains(widget, "int? get priority;"); + TestUtils.assertFileContains(widget, + "case r'priority':", + "specifiedType: const FullType.nullable(int),", + "as int?;", + "if (valueDes == null) continue;"); + + // Explicitly nullable still works (regression guard). + TestUtils.assertFileContains(widget, + "case r'explicitlyNullable':", + "specifiedType: const FullType.nullable(String),", + "as String?;", + "if (valueDes == null) continue;"); + } + @Test public void verifyDartDioGeneratorRuns() throws IOException { File output = Files.createTempDirectory("test").toFile(); diff --git a/modules/openapi-generator/src/test/resources/3_0/dart-dio/built_value_optional_nullable.yaml b/modules/openapi-generator/src/test/resources/3_0/dart-dio/built_value_optional_nullable.yaml new file mode 100644 index 000000000000..ec94105e6b59 --- /dev/null +++ b/modules/openapi-generator/src/test/resources/3_0/dart-dio/built_value_optional_nullable.yaml @@ -0,0 +1,50 @@ +openapi: "3.0.0" +info: + title: Built-value optional / nullable property test + version: "1.0.0" +paths: + /widget/{id}: + get: + operationId: getWidget + parameters: + - name: id + in: path + required: true + schema: { type: integer } + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/Widget" +components: + schemas: + Widget: + type: object + required: + - id + - name + properties: + # required + non-nullable: deserialize as `int`. + id: + type: integer + # required + non-nullable: deserialize as `String`. + name: + type: string + # optional + non-nullable in OpenAPI: dart getter is `String?` + # because Dart can't distinguish "missing" from "null". The + # deserializer must therefore ALSO accept null and skip the + # assignment, otherwise the cast `as String` throws when the + # API returns the field as null. + iconUrl: + type: string + # optional + non-nullable, integer flavor: same shape as iconUrl + # but exercises FullType(int) instead of FullType(String). + priority: + type: integer + # optional + explicitly nullable: existing behavior, kept as a + # regression guard so the fix doesn't break it. + explicitlyNullable: + type: string + nullable: true From 63babf6045b26d4b8726fd1843c343b68ab3c271 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Le=20D=C3=BB?= Date: Thu, 30 Apr 2026 08:18:11 +0200 Subject: [PATCH 2/3] regenerate petstore sample with optional non-nullable fix --- .../model/additional_properties_class.dart | 16 +++-- .../lib/src/model/all_of_with_single_ref.dart | 11 ++-- .../lib/src/model/animal.dart | 6 +- .../lib/src/model/api_response.dart | 16 +++-- .../model/array_of_array_of_number_only.dart | 6 +- .../lib/src/model/array_of_number_only.dart | 6 +- .../lib/src/model/array_test.dart | 16 +++-- .../lib/src/model/capitalization.dart | 31 +++++---- .../lib/src/model/cat.dart | 11 ++-- .../lib/src/model/category.dart | 6 +- .../lib/src/model/child_with_nullable.dart | 11 ++-- .../lib/src/model/class_model.dart | 6 +- .../lib/src/model/deprecated_object.dart | 6 +- .../lib/src/model/dog.dart | 11 ++-- .../lib/src/model/enum_arrays.dart | 11 ++-- .../lib/src/model/enum_test.dart | 31 +++++---- .../fake_big_decimal_map200_response.dart | 11 ++-- .../lib/src/model/file_schema_test_class.dart | 11 ++-- .../lib/src/model/foo.dart | 6 +- .../src/model/foo_get_default_response.dart | 6 +- .../lib/src/model/format_test.dart | 61 ++++++++++------- .../lib/src/model/has_only_read_only.dart | 11 ++-- .../lib/src/model/health_check_result.dart | 1 + .../lib/src/model/map_test.dart | 21 +++--- ...rties_and_additional_properties_class.dart | 16 +++-- .../lib/src/model/model200_response.dart | 11 ++-- .../lib/src/model/model_client.dart | 6 +- .../lib/src/model/model_file.dart | 6 +- .../lib/src/model/model_list.dart | 6 +- .../lib/src/model/model_return.dart | 6 +- .../lib/src/model/name.dart | 16 +++-- .../lib/src/model/nullable_class.dart | 11 ++-- .../lib/src/model/number_only.dart | 6 +- ...s_objects_with_duplicate_inline_enums.dart | 11 ++-- .../model/object_with_deprecated_fields.dart | 21 +++--- .../object_with_duplicate_inline_enum.dart | 6 +- .../lib/src/model/object_with_enum.dart | 6 +- .../src/model/object_with_inline_enum.dart | 6 +- ...object_with_inline_enum_default_value.dart | 6 +- .../lib/src/model/order.dart | 31 +++++---- .../lib/src/model/outer_composite.dart | 16 +++-- .../outer_object_with_enum_property.dart | 1 + .../lib/src/model/parent_with_nullable.dart | 6 +- .../lib/src/model/pet.dart | 21 +++--- .../lib/src/model/read_only_first.dart | 11 ++-- .../lib/src/model/special_model_name.dart | 6 +- .../lib/src/model/tag.dart | 11 ++-- ...reeform_additional_properties_request.dart | 6 +- .../lib/src/model/user.dart | 41 +++++++----- .../lib/src/serializers.dart | 66 +++++++++++++++++-- 50 files changed, 451 insertions(+), 234 deletions(-) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/additional_properties_class.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/additional_properties_class.dart index 145e4b61c3ed..936d339b9d2e 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/additional_properties_class.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/additional_properties_class.dart @@ -96,22 +96,25 @@ class _$AdditionalPropertiesClassSerializer implements PrimitiveSerializer; + specifiedType: const FullType.nullable(BuiltMap, [FullType(String), FullType(String)]), + ) as BuiltMap?; + if (valueDes == null) continue; 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>; + specifiedType: const FullType.nullable(BuiltMap, [FullType(String), FullType(BuiltMap, [FullType(String), FullType(String)])]), + ) as BuiltMap>?; + if (valueDes == null) continue; result.mapOfMapProperty.replace(valueDes); break; case r'map_of_array_integer': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(BuiltMap, [FullType(String), FullType(BuiltList, [FullType(int)])]), - ) as BuiltMap>; + specifiedType: const FullType.nullable(BuiltMap, [FullType(String), FullType(BuiltList, [FullType(int)])]), + ) as BuiltMap>?; + if (valueDes == null) continue; result.mapOfArrayInteger.replace(valueDes); break; default: @@ -122,6 +125,7 @@ class _$AdditionalPropertiesClassSerializer implements PrimitiveSerializer { case r'color': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.color = valueDes; break; default: @@ -182,6 +183,7 @@ class _$$AnimalSerializer implements PrimitiveSerializer<$Animal> { } } + @override $Animal deserialize( Serializers serializers, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/api_response.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/api_response.dart index aadcd792e2bf..91f42cfb50ce 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/api_response.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/api_response.dart @@ -95,22 +95,25 @@ class _$ApiResponseSerializer implements PrimitiveSerializer { case r'code': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(int), - ) as int; + specifiedType: const FullType.nullable(int), + ) as int?; + if (valueDes == null) continue; result.code = valueDes; break; case r'type': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.type = valueDes; break; case r'message': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.message = valueDes; break; default: @@ -121,6 +124,7 @@ class _$ApiResponseSerializer implements PrimitiveSerializer { } } + @override ApiResponse deserialize( Serializers serializers, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/array_of_array_of_number_only.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/array_of_array_of_number_only.dart index 5bc0982b8ab0..90e3e91904c7 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/array_of_array_of_number_only.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/array_of_array_of_number_only.dart @@ -74,8 +74,9 @@ class _$ArrayOfArrayOfNumberOnlySerializer implements PrimitiveSerializer>; + specifiedType: const FullType.nullable(BuiltList, [FullType(BuiltList, [FullType(num)])]), + ) as BuiltList>?; + if (valueDes == null) continue; result.arrayArrayNumber.replace(valueDes); break; default: @@ -86,6 +87,7 @@ class _$ArrayOfArrayOfNumberOnlySerializer implements PrimitiveSerializer; + specifiedType: const FullType.nullable(BuiltList, [FullType(num)]), + ) as BuiltList?; + if (valueDes == null) continue; result.arrayNumber.replace(valueDes); break; default: @@ -86,6 +87,7 @@ class _$ArrayOfNumberOnlySerializer implements PrimitiveSerializer { case r'array_of_string': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(BuiltList, [FullType(String)]), - ) as BuiltList; + specifiedType: const FullType.nullable(BuiltList, [FullType(String)]), + ) as BuiltList?; + if (valueDes == null) continue; 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>; + specifiedType: const FullType.nullable(BuiltList, [FullType(BuiltList, [FullType(int)])]), + ) as BuiltList>?; + if (valueDes == null) continue; 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>; + specifiedType: const FullType.nullable(BuiltList, [FullType(BuiltList, [FullType(ReadOnlyFirst)])]), + ) as BuiltList>?; + if (valueDes == null) continue; result.arrayArrayOfModel.replace(valueDes); break; default: @@ -123,6 +126,7 @@ class _$ArrayTestSerializer implements PrimitiveSerializer { } } + @override ArrayTest deserialize( Serializers serializers, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/capitalization.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/capitalization.dart index 75827b9a429e..7e13eeb16951 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/capitalization.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/capitalization.dart @@ -129,43 +129,49 @@ class _$CapitalizationSerializer implements PrimitiveSerializer case r'smallCamel': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.smallCamel = valueDes; break; case r'CapitalCamel': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.capitalCamel = valueDes; break; case r'small_Snake': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.smallSnake = valueDes; break; case r'Capital_Snake': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.capitalSnake = valueDes; break; case r'SCA_ETH_Flow_Points': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.sCAETHFlowPoints = valueDes; break; case r'ATT_NAME': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.ATT_NAME = valueDes; break; default: @@ -176,6 +182,7 @@ class _$CapitalizationSerializer implements PrimitiveSerializer } } + @override Capitalization deserialize( Serializers serializers, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/cat.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/cat.dart index af1faeef25cd..4b55dc28741d 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/cat.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/cat.dart @@ -89,15 +89,17 @@ class _$CatSerializer implements PrimitiveSerializer { case r'color': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.color = valueDes; break; case r'declawed': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(bool), - ) as bool; + specifiedType: const FullType.nullable(bool), + ) as bool?; + if (valueDes == null) continue; result.declawed = valueDes; break; case r'className': @@ -115,6 +117,7 @@ class _$CatSerializer implements PrimitiveSerializer { } } + @override Cat deserialize( Serializers serializers, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/category.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/category.dart index 3a541dd1fa92..14ea106133bd 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/category.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/category.dart @@ -83,8 +83,9 @@ class _$CategorySerializer implements PrimitiveSerializer { case r'id': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(int), - ) as int; + specifiedType: const FullType.nullable(int), + ) as int?; + if (valueDes == null) continue; result.id = valueDes; break; case r'name': @@ -102,6 +103,7 @@ class _$CategorySerializer implements PrimitiveSerializer { } } + @override Category deserialize( Serializers serializers, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/child_with_nullable.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/child_with_nullable.dart index 17c17aebfa17..496b79b9eaee 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/child_with_nullable.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/child_with_nullable.dart @@ -90,8 +90,9 @@ class _$ChildWithNullableSerializer implements PrimitiveSerializer { case r'_class': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.classField = valueDes; break; default: @@ -85,6 +86,7 @@ class _$ClassModelSerializer implements PrimitiveSerializer { } } + @override ClassModel deserialize( Serializers serializers, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/deprecated_object.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/deprecated_object.dart index 57f089c899c8..1868473fcdd2 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/deprecated_object.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/deprecated_object.dart @@ -74,8 +74,9 @@ class _$DeprecatedObjectSerializer implements PrimitiveSerializer { case r'color': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.color = valueDes; break; case r'breed': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.breed = valueDes; break; case r'className': @@ -115,6 +117,7 @@ class _$DogSerializer implements PrimitiveSerializer { } } + @override Dog deserialize( Serializers serializers, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/enum_arrays.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/enum_arrays.dart index b79a175e833c..9dfc3358afd5 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/enum_arrays.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/enum_arrays.dart @@ -87,15 +87,17 @@ class _$EnumArraysSerializer implements PrimitiveSerializer { case r'just_symbol': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(EnumArraysJustSymbolEnum), - ) as EnumArraysJustSymbolEnum; + specifiedType: const FullType.nullable(EnumArraysJustSymbolEnum), + ) as EnumArraysJustSymbolEnum?; + if (valueDes == null) continue; result.justSymbol = valueDes; break; case r'array_enum': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(BuiltList, [FullType(EnumArraysArrayEnumEnum)]), - ) as BuiltList; + specifiedType: const FullType.nullable(BuiltList, [FullType(EnumArraysArrayEnumEnum)]), + ) as BuiltList?; + if (valueDes == null) continue; result.arrayEnum.replace(valueDes); break; default: @@ -106,6 +108,7 @@ class _$EnumArraysSerializer implements PrimitiveSerializer { } } + @override EnumArrays deserialize( Serializers serializers, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/enum_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/enum_test.dart index 831f5b9d6d2d..5b13970f3ea8 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/enum_test.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/enum_test.dart @@ -161,8 +161,9 @@ class _$EnumTestSerializer implements PrimitiveSerializer { case r'enum_string': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(EnumTestEnumStringEnum), - ) as EnumTestEnumStringEnum; + specifiedType: const FullType.nullable(EnumTestEnumStringEnum), + ) as EnumTestEnumStringEnum?; + if (valueDes == null) continue; result.enumString = valueDes; break; case r'enum_string_required': @@ -175,15 +176,17 @@ class _$EnumTestSerializer implements PrimitiveSerializer { case r'enum_integer': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(EnumTestEnumIntegerEnum), - ) as EnumTestEnumIntegerEnum; + specifiedType: const FullType.nullable(EnumTestEnumIntegerEnum), + ) as EnumTestEnumIntegerEnum?; + if (valueDes == null) continue; result.enumInteger = valueDes; break; case r'enum_number': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(EnumTestEnumNumberEnum), - ) as EnumTestEnumNumberEnum; + specifiedType: const FullType.nullable(EnumTestEnumNumberEnum), + ) as EnumTestEnumNumberEnum?; + if (valueDes == null) continue; result.enumNumber = valueDes; break; case r'outerEnum': @@ -197,22 +200,25 @@ class _$EnumTestSerializer implements PrimitiveSerializer { case r'outerEnumInteger': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(OuterEnumInteger), - ) as OuterEnumInteger; + specifiedType: const FullType.nullable(OuterEnumInteger), + ) as OuterEnumInteger?; + if (valueDes == null) continue; result.outerEnumInteger = valueDes; break; case r'outerEnumDefaultValue': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(OuterEnumDefaultValue), - ) as OuterEnumDefaultValue; + specifiedType: const FullType.nullable(OuterEnumDefaultValue), + ) as OuterEnumDefaultValue?; + if (valueDes == null) continue; result.outerEnumDefaultValue = valueDes; break; case r'outerEnumIntegerDefaultValue': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(OuterEnumIntegerDefaultValue), - ) as OuterEnumIntegerDefaultValue; + specifiedType: const FullType.nullable(OuterEnumIntegerDefaultValue), + ) as OuterEnumIntegerDefaultValue?; + if (valueDes == null) continue; result.outerEnumIntegerDefaultValue = valueDes; break; default: @@ -223,6 +229,7 @@ class _$EnumTestSerializer implements PrimitiveSerializer { } } + @override EnumTest deserialize( Serializers serializers, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/fake_big_decimal_map200_response.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/fake_big_decimal_map200_response.dart index ddfab9d2b56b..e76f2596823d 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/fake_big_decimal_map200_response.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/fake_big_decimal_map200_response.dart @@ -85,15 +85,17 @@ class _$FakeBigDecimalMap200ResponseSerializer implements PrimitiveSerializer; + specifiedType: const FullType.nullable(BuiltMap, [FullType(String), FullType(num)]), + ) as BuiltMap?; + if (valueDes == null) continue; result.someMap.replace(valueDes); break; default: @@ -104,6 +106,7 @@ class _$FakeBigDecimalMap200ResponseSerializer implements PrimitiveSerializer; + specifiedType: const FullType.nullable(BuiltList, [FullType(ModelFile)]), + ) as BuiltList?; + if (valueDes == null) continue; result.files.replace(valueDes); break; default: @@ -105,6 +107,7 @@ class _$FileSchemaTestClassSerializer implements PrimitiveSerializer { case r'bar': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.bar = valueDes; break; default: @@ -86,6 +87,7 @@ class _$FooSerializer implements PrimitiveSerializer { } } + @override Foo deserialize( Serializers serializers, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/foo_get_default_response.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/foo_get_default_response.dart index b5903ebd5dbf..63ad3cacd097 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/foo_get_default_response.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/foo_get_default_response.dart @@ -74,8 +74,9 @@ class _$FooGetDefaultResponseSerializer implements PrimitiveSerializer { case r'integer': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(int), - ) as int; + specifiedType: const FullType.nullable(int), + ) as int?; + if (valueDes == null) continue; result.integer = valueDes; break; case r'int32': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(int), - ) as int; + specifiedType: const FullType.nullable(int), + ) as int?; + if (valueDes == null) continue; result.int32 = valueDes; break; case r'int64': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(int), - ) as int; + specifiedType: const FullType.nullable(int), + ) as int?; + if (valueDes == null) continue; result.int64 = valueDes; break; case r'number': @@ -262,29 +265,33 @@ class _$FormatTestSerializer implements PrimitiveSerializer { case r'float': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(double), - ) as double; + specifiedType: const FullType.nullable(double), + ) as double?; + if (valueDes == null) continue; result.float = valueDes; break; case r'double': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(double), - ) as double; + specifiedType: const FullType.nullable(double), + ) as double?; + if (valueDes == null) continue; result.double_ = valueDes; break; case r'decimal': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(double), - ) as double; + specifiedType: const FullType.nullable(double), + ) as double?; + if (valueDes == null) continue; result.decimal = valueDes; break; case r'string': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.string = valueDes; break; case r'byte': @@ -297,8 +304,9 @@ class _$FormatTestSerializer implements PrimitiveSerializer { case r'binary': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(Uint8List), - ) as Uint8List; + specifiedType: const FullType.nullable(Uint8List), + ) as Uint8List?; + if (valueDes == null) continue; result.binary = valueDes; break; case r'date': @@ -311,15 +319,17 @@ class _$FormatTestSerializer implements PrimitiveSerializer { case r'dateTime': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(DateTime), - ) as DateTime; + specifiedType: const FullType.nullable(DateTime), + ) as DateTime?; + if (valueDes == null) continue; result.dateTime = valueDes; break; case r'uuid': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.uuid = valueDes; break; case r'password': @@ -332,15 +342,17 @@ class _$FormatTestSerializer implements PrimitiveSerializer { case r'pattern_with_digits': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.patternWithDigits = valueDes; break; case r'pattern_with_digits_and_delimiter': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.patternWithDigitsAndDelimiter = valueDes; break; default: @@ -351,6 +363,7 @@ class _$FormatTestSerializer implements PrimitiveSerializer { } } + @override FormatTest deserialize( Serializers serializers, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/has_only_read_only.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/has_only_read_only.dart index 9683985cf198..a2110c3387f9 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/has_only_read_only.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/has_only_read_only.dart @@ -84,15 +84,17 @@ class _$HasOnlyReadOnlySerializer implements PrimitiveSerializer { 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>; + specifiedType: const FullType.nullable(BuiltMap, [FullType(String), FullType(BuiltMap, [FullType(String), FullType(String)])]), + ) as BuiltMap>?; + if (valueDes == null) continue; 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; + specifiedType: const FullType.nullable(BuiltMap, [FullType(String), FullType(MapTestMapOfEnumStringEnum)]), + ) as BuiltMap?; + if (valueDes == null) continue; result.mapOfEnumString.replace(valueDes); break; case r'direct_map': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(BuiltMap, [FullType(String), FullType(bool)]), - ) as BuiltMap; + specifiedType: const FullType.nullable(BuiltMap, [FullType(String), FullType(bool)]), + ) as BuiltMap?; + if (valueDes == null) continue; result.directMap.replace(valueDes); break; case r'indirect_map': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(BuiltMap, [FullType(String), FullType(bool)]), - ) as BuiltMap; + specifiedType: const FullType.nullable(BuiltMap, [FullType(String), FullType(bool)]), + ) as BuiltMap?; + if (valueDes == null) continue; result.indirectMap.replace(valueDes); break; default: @@ -141,6 +145,7 @@ class _$MapTestSerializer implements PrimitiveSerializer { } } + @override MapTest deserialize( Serializers serializers, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/mixed_properties_and_additional_properties_class.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/mixed_properties_and_additional_properties_class.dart index 76b5933ae5a7..c8a23458ee7b 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/mixed_properties_and_additional_properties_class.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/mixed_properties_and_additional_properties_class.dart @@ -97,22 +97,25 @@ class _$MixedPropertiesAndAdditionalPropertiesClassSerializer implements Primiti case r'uuid': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.uuid = valueDes; break; case r'dateTime': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(DateTime), - ) as DateTime; + specifiedType: const FullType.nullable(DateTime), + ) as DateTime?; + if (valueDes == null) continue; result.dateTime = valueDes; break; case r'map': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(BuiltMap, [FullType(String), FullType(Animal)]), - ) as BuiltMap; + specifiedType: const FullType.nullable(BuiltMap, [FullType(String), FullType(Animal)]), + ) as BuiltMap?; + if (valueDes == null) continue; result.map.replace(valueDes); break; default: @@ -123,6 +126,7 @@ class _$MixedPropertiesAndAdditionalPropertiesClassSerializer implements Primiti } } + @override MixedPropertiesAndAdditionalPropertiesClass deserialize( Serializers serializers, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/model200_response.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/model200_response.dart index 0a2cfb4411ac..9722a7325348 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/model200_response.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/model200_response.dart @@ -84,15 +84,17 @@ class _$Model200ResponseSerializer implements PrimitiveSerializer { case r'client': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.client = valueDes; break; default: @@ -85,6 +86,7 @@ class _$ModelClientSerializer implements PrimitiveSerializer { } } + @override ModelClient deserialize( Serializers serializers, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/model_file.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/model_file.dart index 2702c21d36f2..84f2604ad1c5 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/model_file.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/model_file.dart @@ -74,8 +74,9 @@ class _$ModelFileSerializer implements PrimitiveSerializer { case r'sourceURI': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.sourceURI = valueDes; break; default: @@ -86,6 +87,7 @@ class _$ModelFileSerializer implements PrimitiveSerializer { } } + @override ModelFile deserialize( Serializers serializers, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/model_list.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/model_list.dart index 579853258f8e..021b8937c306 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/model_list.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/model_list.dart @@ -73,8 +73,9 @@ class _$ModelListSerializer implements PrimitiveSerializer { case r'123-list': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.n123list = valueDes; break; default: @@ -85,6 +86,7 @@ class _$ModelListSerializer implements PrimitiveSerializer { } } + @override ModelList deserialize( Serializers serializers, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/model_return.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/model_return.dart index 45a2f67f8a40..37a5afb49306 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/model_return.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/model_return.dart @@ -73,8 +73,9 @@ class _$ModelReturnSerializer implements PrimitiveSerializer { case r'return': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(int), - ) as int; + specifiedType: const FullType.nullable(int), + ) as int?; + if (valueDes == null) continue; result.return_ = valueDes; break; default: @@ -85,6 +86,7 @@ class _$ModelReturnSerializer implements PrimitiveSerializer { } } + @override ModelReturn deserialize( Serializers serializers, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/name.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/name.dart index 10fa99e6a5f7..1b0be80d0218 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/name.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/name.dart @@ -111,22 +111,25 @@ class _$NameSerializer implements PrimitiveSerializer { case r'snake_case': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(int), - ) as int; + specifiedType: const FullType.nullable(int), + ) as int?; + if (valueDes == null) continue; result.snakeCase = valueDes; break; case r'property': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.property = valueDes; break; case r'123Number': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(int), - ) as int; + specifiedType: const FullType.nullable(int), + ) as int?; + if (valueDes == null) continue; result.n123number = valueDes; break; default: @@ -137,6 +140,7 @@ class _$NameSerializer implements PrimitiveSerializer { } } + @override Name deserialize( Serializers serializers, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/nullable_class.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/nullable_class.dart index c993a41303f0..43e98d3af680 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/nullable_class.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/nullable_class.dart @@ -261,8 +261,9 @@ class _$NullableClassSerializer implements PrimitiveSerializer { case r'array_items_nullable': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(BuiltList, [FullType.nullable(JsonObject)]), - ) as BuiltList; + specifiedType: const FullType.nullable(BuiltList, [FullType.nullable(JsonObject)]), + ) as BuiltList?; + if (valueDes == null) continue; result.arrayItemsNullable.replace(valueDes); break; case r'object_nullable_prop': @@ -284,8 +285,9 @@ class _$NullableClassSerializer implements PrimitiveSerializer { case r'object_items_nullable': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(BuiltMap, [FullType(String), FullType.nullable(JsonObject)]), - ) as BuiltMap; + specifiedType: const FullType.nullable(BuiltMap, [FullType(String), FullType.nullable(JsonObject)]), + ) as BuiltMap?; + if (valueDes == null) continue; result.objectItemsNullable.replace(valueDes); break; default: @@ -296,6 +298,7 @@ class _$NullableClassSerializer implements PrimitiveSerializer { } } + @override NullableClass deserialize( Serializers serializers, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/number_only.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/number_only.dart index 482a95f3e521..11c059610dfd 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/number_only.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/number_only.dart @@ -73,8 +73,9 @@ class _$NumberOnlySerializer implements PrimitiveSerializer { case r'JustNumber': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(num), - ) as num; + specifiedType: const FullType.nullable(num), + ) as num?; + if (valueDes == null) continue; result.justNumber = valueDes; break; default: @@ -85,6 +86,7 @@ class _$NumberOnlySerializer implements PrimitiveSerializer { } } + @override NumberOnly deserialize( Serializers serializers, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/object_that_references_objects_with_duplicate_inline_enums.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/object_that_references_objects_with_duplicate_inline_enums.dart index e54e67bd7184..8a8167ae83b7 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/object_that_references_objects_with_duplicate_inline_enums.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/object_that_references_objects_with_duplicate_inline_enums.dart @@ -86,15 +86,17 @@ class _$ObjectThatReferencesObjectsWithDuplicateInlineEnumsSerializer implements case r'object_one': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(ObjectWithInlineEnum), - ) as ObjectWithInlineEnum; + specifiedType: const FullType.nullable(ObjectWithInlineEnum), + ) as ObjectWithInlineEnum?; + if (valueDes == null) continue; result.objectOne.replace(valueDes); break; case r'object_two': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(ObjectWithDuplicateInlineEnum), - ) as ObjectWithDuplicateInlineEnum; + specifiedType: const FullType.nullable(ObjectWithDuplicateInlineEnum), + ) as ObjectWithDuplicateInlineEnum?; + if (valueDes == null) continue; result.objectTwo.replace(valueDes); break; default: @@ -105,6 +107,7 @@ class _$ObjectThatReferencesObjectsWithDuplicateInlineEnumsSerializer implements } } + @override ObjectThatReferencesObjectsWithDuplicateInlineEnums deserialize( Serializers serializers, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/object_with_deprecated_fields.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/object_with_deprecated_fields.dart index 4e0ae04ae50d..605ca2887f32 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/object_with_deprecated_fields.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/object_with_deprecated_fields.dart @@ -111,29 +111,33 @@ class _$ObjectWithDeprecatedFieldsSerializer implements PrimitiveSerializer; + specifiedType: const FullType.nullable(BuiltList, [FullType(String)]), + ) as BuiltList?; + if (valueDes == null) continue; result.bars.replace(valueDes); break; default: @@ -144,6 +148,7 @@ class _$ObjectWithDeprecatedFieldsSerializer implements PrimitiveSerializer; + specifiedType: const FullType.nullable(BuiltSet, [FullType(ObjectWithDuplicateInlineEnumAttributeEnum)]), + ) as BuiltSet?; + if (valueDes == null) continue; result.attribute.replace(valueDes); break; default: @@ -88,6 +89,7 @@ class _$ObjectWithDuplicateInlineEnumSerializer implements PrimitiveSerializer case r'attribute': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(TestEnum), - ) as TestEnum; + specifiedType: const FullType.nullable(TestEnum), + ) as TestEnum?; + if (valueDes == null) continue; result.attribute = valueDes; break; default: @@ -88,6 +89,7 @@ class _$ObjectWithEnumSerializer implements PrimitiveSerializer } } + @override ObjectWithEnum deserialize( Serializers serializers, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/object_with_inline_enum.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/object_with_inline_enum.dart index cd8df2af1695..19182c7eb50d 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/object_with_inline_enum.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/object_with_inline_enum.dart @@ -76,8 +76,9 @@ class _$ObjectWithInlineEnumSerializer implements PrimitiveSerializer; + specifiedType: const FullType.nullable(BuiltSet, [FullType(ObjectWithInlineEnumAttributeEnum)]), + ) as BuiltSet?; + if (valueDes == null) continue; result.attribute.replace(valueDes); break; default: @@ -88,6 +89,7 @@ class _$ObjectWithInlineEnumSerializer implements PrimitiveSerializer { case r'id': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(int), - ) as int; + specifiedType: const FullType.nullable(int), + ) as int?; + if (valueDes == null) continue; result.id = valueDes; break; case r'petId': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(int), - ) as int; + specifiedType: const FullType.nullable(int), + ) as int?; + if (valueDes == null) continue; result.petId = valueDes; break; case r'quantity': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(int), - ) as int; + specifiedType: const FullType.nullable(int), + ) as int?; + if (valueDes == null) continue; result.quantity = valueDes; break; case r'shipDate': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(DateTime), - ) as DateTime; + specifiedType: const FullType.nullable(DateTime), + ) as DateTime?; + if (valueDes == null) continue; result.shipDate = valueDes; break; case r'status': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(OrderStatusEnum), - ) as OrderStatusEnum; + specifiedType: const FullType.nullable(OrderStatusEnum), + ) as OrderStatusEnum?; + if (valueDes == null) continue; result.status = valueDes; break; case r'complete': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(bool), - ) as bool; + specifiedType: const FullType.nullable(bool), + ) as bool?; + if (valueDes == null) continue; result.complete = valueDes; break; default: @@ -179,6 +185,7 @@ class _$OrderSerializer implements PrimitiveSerializer { } } + @override Order deserialize( Serializers serializers, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/outer_composite.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/outer_composite.dart index 0d6341cc1299..53f0668e996f 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/outer_composite.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/outer_composite.dart @@ -95,22 +95,25 @@ class _$OuterCompositeSerializer implements PrimitiveSerializer case r'my_number': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(num), - ) as num; + specifiedType: const FullType.nullable(num), + ) as num?; + if (valueDes == null) continue; result.myNumber = valueDes; break; case r'my_string': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.myString = valueDes; break; case r'my_boolean': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(bool), - ) as bool; + specifiedType: const FullType.nullable(bool), + ) as bool?; + if (valueDes == null) continue; result.myBoolean = valueDes; break; default: @@ -121,6 +124,7 @@ class _$OuterCompositeSerializer implements PrimitiveSerializer } } + @override OuterComposite deserialize( Serializers serializers, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/outer_object_with_enum_property.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/outer_object_with_enum_property.dart index 173329856452..bab69cae9e60 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/outer_object_with_enum_property.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/outer_object_with_enum_property.dart @@ -85,6 +85,7 @@ class _$OuterObjectWithEnumPropertySerializer implements PrimitiveSerializer { case r'id': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(int), - ) as int; + specifiedType: const FullType.nullable(int), + ) as int?; + if (valueDes == null) continue; result.id = valueDes; break; case r'category': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(Category), - ) as Category; + specifiedType: const FullType.nullable(Category), + ) as Category?; + if (valueDes == null) continue; result.category.replace(valueDes); break; case r'name': @@ -157,15 +159,17 @@ class _$PetSerializer implements PrimitiveSerializer { case r'tags': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(BuiltList, [FullType(Tag)]), - ) as BuiltList; + specifiedType: const FullType.nullable(BuiltList, [FullType(Tag)]), + ) as BuiltList?; + if (valueDes == null) continue; result.tags.replace(valueDes); break; case r'status': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(PetStatusEnum), - ) as PetStatusEnum; + specifiedType: const FullType.nullable(PetStatusEnum), + ) as PetStatusEnum?; + if (valueDes == null) continue; result.status = valueDes; break; default: @@ -176,6 +180,7 @@ class _$PetSerializer implements PrimitiveSerializer { } } + @override Pet deserialize( Serializers serializers, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/read_only_first.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/read_only_first.dart index b619217ab3cb..30b1323daff1 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/read_only_first.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/read_only_first.dart @@ -84,15 +84,17 @@ class _$ReadOnlyFirstSerializer implements PrimitiveSerializer { case r'bar': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.bar = valueDes; break; case r'baz': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.baz = valueDes; break; default: @@ -103,6 +105,7 @@ class _$ReadOnlyFirstSerializer implements PrimitiveSerializer { } } + @override ReadOnlyFirst deserialize( Serializers serializers, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/special_model_name.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/special_model_name.dart index fa860056b45d..401f7268599c 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/special_model_name.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/special_model_name.dart @@ -73,8 +73,9 @@ class _$SpecialModelNameSerializer implements PrimitiveSerializer { case r'id': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(int), - ) as int; + specifiedType: const FullType.nullable(int), + ) as int?; + if (valueDes == null) continue; result.id = valueDes; break; case r'name': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.name = valueDes; break; default: @@ -103,6 +105,7 @@ class _$TagSerializer implements PrimitiveSerializer { } } + @override Tag deserialize( Serializers serializers, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/test_inline_freeform_additional_properties_request.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/test_inline_freeform_additional_properties_request.dart index 3bc31dc96e6b..8672a7ae8b91 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/test_inline_freeform_additional_properties_request.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/test_inline_freeform_additional_properties_request.dart @@ -75,8 +75,9 @@ class _$TestInlineFreeformAdditionalPropertiesRequestSerializer implements Primi case r'someProperty': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.someProperty = valueDes; break; default: @@ -87,6 +88,7 @@ class _$TestInlineFreeformAdditionalPropertiesRequestSerializer implements Primi } } + @override TestInlineFreeformAdditionalPropertiesRequest deserialize( Serializers serializers, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/user.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/user.dart index f7577d7e1ee9..2c30f952961a 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/user.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/user.dart @@ -151,57 +151,65 @@ class _$UserSerializer implements PrimitiveSerializer { case r'id': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(int), - ) as int; + specifiedType: const FullType.nullable(int), + ) as int?; + if (valueDes == null) continue; result.id = valueDes; break; case r'username': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.username = valueDes; break; case r'firstName': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.firstName = valueDes; break; case r'lastName': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.lastName = valueDes; break; case r'email': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.email = valueDes; break; case r'password': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.password = valueDes; break; case r'phone': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.phone = valueDes; break; case r'userStatus': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(int), - ) as int; + specifiedType: const FullType.nullable(int), + ) as int?; + if (valueDes == null) continue; result.userStatus = valueDes; break; default: @@ -212,6 +220,7 @@ class _$UserSerializer implements PrimitiveSerializer { } } + @override User deserialize( Serializers serializers, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/serializers.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/serializers.dart index f55ca699ac78..32c32792ab56 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/serializers.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/serializers.dart @@ -136,6 +136,34 @@ Serializers serializers = (_$serializers.toBuilder() const FullType(BuiltMap, [FullType(String), FullType(String)]), () => MapBuilder(), ) + ..addBuilderFactory( + ) + ..addBuilderFactory( + const FullType(BuiltMap, [FullType(String), FullType(num)]), + () => MapBuilder(), + ) + ..addBuilderFactory( + const FullType(BuiltMap, [FullType(String), FullType(Animal)]), + () => MapBuilder(), + ) + ..addBuilderFactory( + const FullType(BuiltList, [FullType(ReadOnlyFirst)]), + () => ListBuilder(), + ) + ..addBuilderFactory( + ) + ..addBuilderFactory( + ) + ..addBuilderFactory( + const FullType(BuiltMap, [FullType(String), FullType(int)]), + () => MapBuilder(), + ) + ..addBuilderFactory( + ) + ..addBuilderFactory( + const FullType(BuiltList, [FullType(num)]), + () => ListBuilder(), + ) ..addBuilderFactory( const FullType(BuiltList, [FullType(User)]), () => ListBuilder(), @@ -144,6 +172,8 @@ Serializers serializers = (_$serializers.toBuilder() const FullType(BuiltSet, [FullType(String)]), () => SetBuilder(), ) + ..addBuilderFactory( + ) ..addBuilderFactory( const FullType(BuiltSet, [FullType(Pet)]), () => SetBuilder(), @@ -153,21 +183,45 @@ Serializers serializers = (_$serializers.toBuilder() () => ListBuilder(), ) ..addBuilderFactory( - const FullType(BuiltMap, [FullType(String), FullType.nullable(JsonObject)]), - () => MapBuilder(), - ) - ..addBuilderFactory( - const FullType(BuiltMap, [FullType(String), FullType(int)]), - () => MapBuilder(), + const FullType(BuiltList, [FullType(JsonObject)]), + () => ListBuilder(), ) ..addBuilderFactory( const FullType(BuiltList, [FullType(ModelEnumClass)]), () => ListBuilder(), ) + ..addBuilderFactory( + const FullType(BuiltList, [FullType.nullable(JsonObject)]), + () => ListBuilder(), + ) + ..addBuilderFactory( + const FullType(BuiltList, [FullType(Tag)]), + () => ListBuilder(), + ) + ..addBuilderFactory( + const FullType(BuiltList, [FullType(ModelFile)]), + () => ListBuilder(), + ) + ..addBuilderFactory( + const FullType(BuiltList, [FullType(int)]), + () => ListBuilder(), + ) + ..addBuilderFactory( + const FullType(BuiltMap, [FullType(String), FullType.nullable(JsonObject)]), + () => MapBuilder(), + ) + ..addBuilderFactory( + const FullType(BuiltMap, [FullType(String), FullType(bool)]), + () => MapBuilder(), + ) ..addBuilderFactory( const FullType(BuiltList, [FullType(String)]), () => ListBuilder(), ) + ..addBuilderFactory( + const FullType(BuiltMap, [FullType(String), FullType(JsonObject)]), + () => MapBuilder(), + ) ..add(Animal.serializer) ..add(ParentWithNullable.serializer) ..add(const OneOfSerializer()) From 906691b462b503eace3db618ef25e0b3f19522de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Le=20D=C3=BB?= Date: Sat, 9 May 2026 09:35:52 +0200 Subject: [PATCH 3/3] fix regenerated samples and remove template trailing newline - Remove trailing newline in deserialize_properties.mustache that caused double blank lines in generated output - Regenerate all dart-dio samples (oneof, oneof_polymorphism_and_inheritance, oneof_primitive, petstore-timemachine) with optional non-nullable fix - Fix corrupt serializers.dart that had empty addBuilderFactory() calls causing compilation errors --- .../deserialize_properties.mustache | 2 +- .../dart-dio/oneof/lib/src/model/apple.dart | 5 +- .../dart-dio/oneof/lib/src/model/banana.dart | 5 +- .../dart-dio/oneof/lib/src/model/fruit.dart | 5 +- .../dart-dio/oneof/lib/src/model/orange.dart | 5 +- .../lib/src/model/addressable.dart | 10 +-- .../lib/src/model/bar.dart | 35 ++++++---- .../lib/src/model/bar_create.dart | 35 ++++++---- .../lib/src/model/bar_ref.dart | 30 +++++---- .../lib/src/model/cat.dart | 5 +- .../lib/src/model/dog.dart | 5 +- .../lib/src/model/entity.dart | 20 +++--- .../lib/src/model/entity_ref.dart | 30 +++++---- .../lib/src/model/extensible.dart | 10 +-- .../lib/src/model/foo.dart | 30 +++++---- .../lib/src/model/foo_ref.dart | 35 ++++++---- .../lib/src/model/pasta.dart | 25 ++++--- .../lib/src/model/pizza.dart | 25 ++++--- .../lib/src/model/pizza_speziale.dart | 30 +++++---- .../oneof_primitive/lib/src/model/child.dart | 5 +- .../lib/src/model/api_response.dart | 15 +++-- .../lib/src/model/category.dart | 10 +-- .../lib/src/model/order.dart | 30 +++++---- .../lib/src/model/pet.dart | 20 +++--- .../lib/src/model/tag.dart | 10 +-- .../lib/src/model/user.dart | 40 ++++++----- .../model/additional_properties_class.dart | 1 - .../lib/src/model/all_of_with_single_ref.dart | 1 - .../lib/src/model/animal.dart | 1 - .../lib/src/model/api_response.dart | 1 - .../model/array_of_array_of_number_only.dart | 1 - .../lib/src/model/array_of_number_only.dart | 1 - .../lib/src/model/array_test.dart | 1 - .../lib/src/model/capitalization.dart | 1 - .../lib/src/model/cat.dart | 1 - .../lib/src/model/category.dart | 1 - .../lib/src/model/child_with_nullable.dart | 1 - .../lib/src/model/class_model.dart | 1 - .../lib/src/model/deprecated_object.dart | 1 - .../lib/src/model/dog.dart | 1 - .../lib/src/model/enum_arrays.dart | 1 - .../lib/src/model/enum_test.dart | 1 - .../fake_big_decimal_map200_response.dart | 1 - .../lib/src/model/file_schema_test_class.dart | 1 - .../lib/src/model/foo.dart | 1 - .../src/model/foo_get_default_response.dart | 1 - .../lib/src/model/format_test.dart | 1 - .../lib/src/model/has_only_read_only.dart | 1 - .../lib/src/model/health_check_result.dart | 1 - .../lib/src/model/map_test.dart | 1 - ...rties_and_additional_properties_class.dart | 1 - .../lib/src/model/model200_response.dart | 1 - .../lib/src/model/model_client.dart | 1 - .../lib/src/model/model_file.dart | 1 - .../lib/src/model/model_list.dart | 1 - .../lib/src/model/model_return.dart | 1 - .../lib/src/model/name.dart | 1 - .../lib/src/model/nullable_class.dart | 1 - .../lib/src/model/number_only.dart | 1 - ...s_objects_with_duplicate_inline_enums.dart | 1 - .../model/object_with_deprecated_fields.dart | 1 - .../object_with_duplicate_inline_enum.dart | 1 - .../lib/src/model/object_with_enum.dart | 1 - .../src/model/object_with_inline_enum.dart | 1 - ...object_with_inline_enum_default_value.dart | 1 - .../lib/src/model/order.dart | 1 - .../lib/src/model/outer_composite.dart | 1 - .../outer_object_with_enum_property.dart | 1 - .../lib/src/model/parent_with_nullable.dart | 1 - .../lib/src/model/pet.dart | 1 - .../lib/src/model/read_only_first.dart | 1 - .../lib/src/model/special_model_name.dart | 1 - .../lib/src/model/tag.dart | 1 - ...reeform_additional_properties_request.dart | 1 - .../lib/src/model/user.dart | 1 - .../lib/src/serializers.dart | 66 ++----------------- 76 files changed, 292 insertions(+), 300 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/deserialize_properties.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/deserialize_properties.mustache index becdd3f40477..b5a11de35b0f 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/deserialize_properties.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/deserialize_properties.mustache @@ -59,4 +59,4 @@ break; } } - } + } \ No newline at end of file diff --git a/samples/openapi3/client/petstore/dart-dio/oneof/lib/src/model/apple.dart b/samples/openapi3/client/petstore/dart-dio/oneof/lib/src/model/apple.dart index 02ca94190b96..8d72f1ac98c2 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof/lib/src/model/apple.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof/lib/src/model/apple.dart @@ -73,8 +73,9 @@ class _$AppleSerializer implements PrimitiveSerializer { case r'kind': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.kind = valueDes; break; default: diff --git a/samples/openapi3/client/petstore/dart-dio/oneof/lib/src/model/banana.dart b/samples/openapi3/client/petstore/dart-dio/oneof/lib/src/model/banana.dart index bf2d632ee114..82a6a430ea62 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof/lib/src/model/banana.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof/lib/src/model/banana.dart @@ -73,8 +73,9 @@ class _$BananaSerializer implements PrimitiveSerializer { case r'count': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(num), - ) as num; + specifiedType: const FullType.nullable(num), + ) as num?; + if (valueDes == null) continue; result.count = valueDes; break; default: diff --git a/samples/openapi3/client/petstore/dart-dio/oneof/lib/src/model/fruit.dart b/samples/openapi3/client/petstore/dart-dio/oneof/lib/src/model/fruit.dart index 9f969087268e..a9fe02968153 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof/lib/src/model/fruit.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof/lib/src/model/fruit.dart @@ -86,8 +86,9 @@ class _$FruitSerializer implements PrimitiveSerializer { case r'color': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.color = valueDes; break; default: diff --git a/samples/openapi3/client/petstore/dart-dio/oneof/lib/src/model/orange.dart b/samples/openapi3/client/petstore/dart-dio/oneof/lib/src/model/orange.dart index 780c06144e3f..ecf8e89e9427 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof/lib/src/model/orange.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof/lib/src/model/orange.dart @@ -73,8 +73,9 @@ class _$OrangeSerializer implements PrimitiveSerializer { case r'sweet': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(bool), - ) as bool; + specifiedType: const FullType.nullable(bool), + ) as bool?; + if (valueDes == null) continue; result.sweet = valueDes; break; default: diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/addressable.dart b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/addressable.dart index 0ab0936d5673..82dcc8f402e2 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/addressable.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/addressable.dart @@ -119,15 +119,17 @@ class _$$AddressableSerializer implements PrimitiveSerializer<$Addressable> { case r'href': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.href = valueDes; break; case r'id': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.id = valueDes; break; default: diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/bar.dart b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/bar.dart index b993c17d03b4..4aaebb7630a7 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/bar.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/bar.dart @@ -135,43 +135,49 @@ class _$BarSerializer implements PrimitiveSerializer { case r'@schemaLocation': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.atSchemaLocation = valueDes; break; case r'foo': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(FooRefOrValue), - ) as FooRefOrValue; + specifiedType: const FullType.nullable(FooRefOrValue), + ) as FooRefOrValue?; + if (valueDes == null) continue; result.foo.replace(valueDes); break; case r'@baseType': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.atBaseType = valueDes; break; case r'fooPropB': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.fooPropB = valueDes; break; case r'href': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.href = valueDes; break; case r'id': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.id = valueDes; break; case r'@type': @@ -184,8 +190,9 @@ class _$BarSerializer implements PrimitiveSerializer { case r'barPropA': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.barPropA = valueDes; break; default: diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/bar_create.dart b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/bar_create.dart index 18e081045142..d7c7a5e5ea82 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/bar_create.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/bar_create.dart @@ -135,43 +135,49 @@ class _$BarCreateSerializer implements PrimitiveSerializer { case r'@schemaLocation': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.atSchemaLocation = valueDes; break; case r'foo': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(FooRefOrValue), - ) as FooRefOrValue; + specifiedType: const FullType.nullable(FooRefOrValue), + ) as FooRefOrValue?; + if (valueDes == null) continue; result.foo.replace(valueDes); break; case r'@baseType': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.atBaseType = valueDes; break; case r'fooPropB': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.fooPropB = valueDes; break; case r'href': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.href = valueDes; break; case r'id': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.id = valueDes; break; case r'@type': @@ -184,8 +190,9 @@ class _$BarCreateSerializer implements PrimitiveSerializer { case r'barPropA': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.barPropA = valueDes; break; default: diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/bar_ref.dart b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/bar_ref.dart index 84c1e4225d5c..4b76020dbe15 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/bar_ref.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/bar_ref.dart @@ -117,43 +117,49 @@ class _$BarRefSerializer implements PrimitiveSerializer { case r'@schemaLocation': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.atSchemaLocation = valueDes; break; case r'@referredType': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.atReferredType = valueDes; break; case r'name': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.name = valueDes; break; case r'@baseType': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.atBaseType = valueDes; break; case r'href': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.href = valueDes; break; case r'id': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.id = valueDes; break; case r'@type': diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/cat.dart b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/cat.dart index 49dcb76828c3..0d9600ad621f 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/cat.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/cat.dart @@ -73,8 +73,9 @@ class _$CatSerializer implements PrimitiveSerializer { case r'declawed': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(bool), - ) as bool; + specifiedType: const FullType.nullable(bool), + ) as bool?; + if (valueDes == null) continue; result.declawed = valueDes; break; default: diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/dog.dart b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/dog.dart index d6a1d27c5b3c..accf1a913dc8 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/dog.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/dog.dart @@ -73,8 +73,9 @@ class _$DogSerializer implements PrimitiveSerializer { case r'bark': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(bool), - ) as bool; + specifiedType: const FullType.nullable(bool), + ) as bool?; + if (valueDes == null) continue; result.bark = valueDes; break; default: diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/entity.dart b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/entity.dart index 7e27fab47387..44d325f99cb8 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/entity.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/entity.dart @@ -235,29 +235,33 @@ class _$$EntitySerializer implements PrimitiveSerializer<$Entity> { case r'@schemaLocation': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.atSchemaLocation = valueDes; break; case r'@baseType': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.atBaseType = valueDes; break; case r'href': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.href = valueDes; break; case r'id': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.id = valueDes; break; case r'@type': diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/entity_ref.dart b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/entity_ref.dart index 91fdfd017d78..7cc0b9f1f43a 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/entity_ref.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/entity_ref.dart @@ -207,43 +207,49 @@ class _$$EntityRefSerializer implements PrimitiveSerializer<$EntityRef> { case r'@schemaLocation': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.atSchemaLocation = valueDes; break; case r'@referredType': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.atReferredType = valueDes; break; case r'name': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.name = valueDes; break; case r'@baseType': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.atBaseType = valueDes; break; case r'href': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.href = valueDes; break; case r'id': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.id = valueDes; break; case r'@type': diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/extensible.dart b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/extensible.dart index 2423fb276412..c18886bfd1a6 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/extensible.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/extensible.dart @@ -129,15 +129,17 @@ class _$$ExtensibleSerializer implements PrimitiveSerializer<$Extensible> { case r'@schemaLocation': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.atSchemaLocation = valueDes; break; case r'@baseType': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.atBaseType = valueDes; break; case r'@type': diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/foo.dart b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/foo.dart index d53271b23f6d..7e710c39eec6 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/foo.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/foo.dart @@ -123,43 +123,49 @@ class _$FooSerializer implements PrimitiveSerializer { case r'@schemaLocation': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.atSchemaLocation = valueDes; break; case r'fooPropA': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.fooPropA = valueDes; break; case r'@baseType': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.atBaseType = valueDes; break; case r'fooPropB': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.fooPropB = valueDes; break; case r'href': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.href = valueDes; break; case r'id': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.id = valueDes; break; case r'@type': diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/foo_ref.dart b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/foo_ref.dart index 0821d3d6b2ba..1e698f069531 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/foo_ref.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/foo_ref.dart @@ -128,50 +128,57 @@ class _$FooRefSerializer implements PrimitiveSerializer { case r'@schemaLocation': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.atSchemaLocation = valueDes; break; case r'@referredType': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.atReferredType = valueDes; break; case r'foorefPropA': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.foorefPropA = valueDes; break; case r'name': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.name = valueDes; break; case r'@baseType': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.atBaseType = valueDes; break; case r'href': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.href = valueDes; break; case r'id': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.id = valueDes; break; case r'@type': diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/pasta.dart b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/pasta.dart index 464138865122..2ad3f58c8b33 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/pasta.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/pasta.dart @@ -112,29 +112,33 @@ class _$PastaSerializer implements PrimitiveSerializer { case r'@schemaLocation': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.atSchemaLocation = valueDes; break; case r'@baseType': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.atBaseType = valueDes; break; case r'href': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.href = valueDes; break; case r'id': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.id = valueDes; break; case r'@type': @@ -147,8 +151,9 @@ class _$PastaSerializer implements PrimitiveSerializer { case r'vendor': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.vendor = valueDes; break; default: diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/pizza.dart b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/pizza.dart index 6e255af0866f..4ed6d5c33c02 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/pizza.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/pizza.dart @@ -180,36 +180,41 @@ class _$$PizzaSerializer implements PrimitiveSerializer<$Pizza> { case r'pizzaSize': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(num), - ) as num; + specifiedType: const FullType.nullable(num), + ) as num?; + if (valueDes == null) continue; result.pizzaSize = valueDes; break; case r'@schemaLocation': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.atSchemaLocation = valueDes; break; case r'@baseType': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.atBaseType = valueDes; break; case r'href': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.href = valueDes; break; case r'id': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.id = valueDes; break; case r'@type': diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/pizza_speziale.dart b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/pizza_speziale.dart index e7b0a05e729f..7c0e07d730c9 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/pizza_speziale.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/pizza_speziale.dart @@ -120,43 +120,49 @@ class _$PizzaSpezialeSerializer implements PrimitiveSerializer { case r'@schemaLocation': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.atSchemaLocation = valueDes; break; case r'pizzaSize': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(num), - ) as num; + specifiedType: const FullType.nullable(num), + ) as num?; + if (valueDes == null) continue; result.pizzaSize = valueDes; break; case r'toppings': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.toppings = valueDes; break; case r'@baseType': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.atBaseType = valueDes; break; case r'href': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.href = valueDes; break; case r'id': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.id = valueDes; break; case r'@type': diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_primitive/lib/src/model/child.dart b/samples/openapi3/client/petstore/dart-dio/oneof_primitive/lib/src/model/child.dart index 987b52ca7240..3d48ae5cb735 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_primitive/lib/src/model/child.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_primitive/lib/src/model/child.dart @@ -73,8 +73,9 @@ class _$ChildSerializer implements PrimitiveSerializer { case r'name': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.name = valueDes; break; default: diff --git a/samples/openapi3/client/petstore/dart-dio/petstore-timemachine/lib/src/model/api_response.dart b/samples/openapi3/client/petstore/dart-dio/petstore-timemachine/lib/src/model/api_response.dart index 024a6044470b..b9f8041ce768 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore-timemachine/lib/src/model/api_response.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore-timemachine/lib/src/model/api_response.dart @@ -95,22 +95,25 @@ class _$ApiResponseSerializer implements PrimitiveSerializer { case r'code': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(int), - ) as int; + specifiedType: const FullType.nullable(int), + ) as int?; + if (valueDes == null) continue; result.code = valueDes; break; case r'type': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.type = valueDes; break; case r'message': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.message = valueDes; break; default: diff --git a/samples/openapi3/client/petstore/dart-dio/petstore-timemachine/lib/src/model/category.dart b/samples/openapi3/client/petstore/dart-dio/petstore-timemachine/lib/src/model/category.dart index bf479d398cc0..e4c41eca8f6f 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore-timemachine/lib/src/model/category.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore-timemachine/lib/src/model/category.dart @@ -84,15 +84,17 @@ class _$CategorySerializer implements PrimitiveSerializer { case r'id': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(int), - ) as int; + specifiedType: const FullType.nullable(int), + ) as int?; + if (valueDes == null) continue; result.id = valueDes; break; case r'name': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.name = valueDes; break; default: diff --git a/samples/openapi3/client/petstore/dart-dio/petstore-timemachine/lib/src/model/order.dart b/samples/openapi3/client/petstore/dart-dio/petstore-timemachine/lib/src/model/order.dart index 75a029d91df3..f60f75b9195e 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore-timemachine/lib/src/model/order.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore-timemachine/lib/src/model/order.dart @@ -133,43 +133,49 @@ class _$OrderSerializer implements PrimitiveSerializer { case r'id': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(int), - ) as int; + specifiedType: const FullType.nullable(int), + ) as int?; + if (valueDes == null) continue; result.id = valueDes; break; case r'petId': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(int), - ) as int; + specifiedType: const FullType.nullable(int), + ) as int?; + if (valueDes == null) continue; result.petId = valueDes; break; case r'quantity': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(int), - ) as int; + specifiedType: const FullType.nullable(int), + ) as int?; + if (valueDes == null) continue; result.quantity = valueDes; break; case r'shipDate': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(OffsetDateTime), - ) as OffsetDateTime; + specifiedType: const FullType.nullable(OffsetDateTime), + ) as OffsetDateTime?; + if (valueDes == null) continue; result.shipDate = valueDes; break; case r'status': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(OrderStatusEnum), - ) as OrderStatusEnum; + specifiedType: const FullType.nullable(OrderStatusEnum), + ) as OrderStatusEnum?; + if (valueDes == null) continue; result.status = valueDes; break; case r'complete': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(bool), - ) as bool; + specifiedType: const FullType.nullable(bool), + ) as bool?; + if (valueDes == null) continue; result.complete = valueDes; break; default: diff --git a/samples/openapi3/client/petstore/dart-dio/petstore-timemachine/lib/src/model/pet.dart b/samples/openapi3/client/petstore/dart-dio/petstore-timemachine/lib/src/model/pet.dart index 83117423a0a7..f018b90b047f 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore-timemachine/lib/src/model/pet.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore-timemachine/lib/src/model/pet.dart @@ -130,15 +130,17 @@ class _$PetSerializer implements PrimitiveSerializer { case r'id': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(int), - ) as int; + specifiedType: const FullType.nullable(int), + ) as int?; + if (valueDes == null) continue; result.id = valueDes; break; case r'category': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(Category), - ) as Category; + specifiedType: const FullType.nullable(Category), + ) as Category?; + if (valueDes == null) continue; result.category.replace(valueDes); break; case r'name': @@ -158,15 +160,17 @@ class _$PetSerializer implements PrimitiveSerializer { case r'tags': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(BuiltList, [FullType(Tag)]), - ) as BuiltList; + specifiedType: const FullType.nullable(BuiltList, [FullType(Tag)]), + ) as BuiltList?; + if (valueDes == null) continue; result.tags.replace(valueDes); break; case r'status': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(PetStatusEnum), - ) as PetStatusEnum; + specifiedType: const FullType.nullable(PetStatusEnum), + ) as PetStatusEnum?; + if (valueDes == null) continue; result.status = valueDes; break; default: diff --git a/samples/openapi3/client/petstore/dart-dio/petstore-timemachine/lib/src/model/tag.dart b/samples/openapi3/client/petstore/dart-dio/petstore-timemachine/lib/src/model/tag.dart index e074eaf98c54..fd7760f0fee1 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore-timemachine/lib/src/model/tag.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore-timemachine/lib/src/model/tag.dart @@ -84,15 +84,17 @@ class _$TagSerializer implements PrimitiveSerializer { case r'id': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(int), - ) as int; + specifiedType: const FullType.nullable(int), + ) as int?; + if (valueDes == null) continue; result.id = valueDes; break; case r'name': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.name = valueDes; break; default: diff --git a/samples/openapi3/client/petstore/dart-dio/petstore-timemachine/lib/src/model/user.dart b/samples/openapi3/client/petstore/dart-dio/petstore-timemachine/lib/src/model/user.dart index b4563c690bcf..e0324764bb00 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore-timemachine/lib/src/model/user.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore-timemachine/lib/src/model/user.dart @@ -151,57 +151,65 @@ class _$UserSerializer implements PrimitiveSerializer { case r'id': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(int), - ) as int; + specifiedType: const FullType.nullable(int), + ) as int?; + if (valueDes == null) continue; result.id = valueDes; break; case r'username': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.username = valueDes; break; case r'firstName': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.firstName = valueDes; break; case r'lastName': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.lastName = valueDes; break; case r'email': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.email = valueDes; break; case r'password': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.password = valueDes; break; case r'phone': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.phone = valueDes; break; case r'userStatus': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(int), - ) as int; + specifiedType: const FullType.nullable(int), + ) as int?; + if (valueDes == null) continue; result.userStatus = valueDes; break; default: diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/additional_properties_class.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/additional_properties_class.dart index 936d339b9d2e..bdd79bef26a3 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/additional_properties_class.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/additional_properties_class.dart @@ -125,7 +125,6 @@ class _$AdditionalPropertiesClassSerializer implements PrimitiveSerializer { } } - @override $Animal deserialize( Serializers serializers, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/api_response.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/api_response.dart index 91f42cfb50ce..29d12d3918f5 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/api_response.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/api_response.dart @@ -124,7 +124,6 @@ class _$ApiResponseSerializer implements PrimitiveSerializer { } } - @override ApiResponse deserialize( Serializers serializers, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/array_of_array_of_number_only.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/array_of_array_of_number_only.dart index 90e3e91904c7..f5f800824b83 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/array_of_array_of_number_only.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/array_of_array_of_number_only.dart @@ -87,7 +87,6 @@ class _$ArrayOfArrayOfNumberOnlySerializer implements PrimitiveSerializer { } } - @override ArrayTest deserialize( Serializers serializers, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/capitalization.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/capitalization.dart index 7e13eeb16951..df0353adf20a 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/capitalization.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/capitalization.dart @@ -182,7 +182,6 @@ class _$CapitalizationSerializer implements PrimitiveSerializer } } - @override Capitalization deserialize( Serializers serializers, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/cat.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/cat.dart index 4b55dc28741d..d7400c8c9f9c 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/cat.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/cat.dart @@ -117,7 +117,6 @@ class _$CatSerializer implements PrimitiveSerializer { } } - @override Cat deserialize( Serializers serializers, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/category.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/category.dart index 14ea106133bd..74a96fb63f91 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/category.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/category.dart @@ -103,7 +103,6 @@ class _$CategorySerializer implements PrimitiveSerializer { } } - @override Category deserialize( Serializers serializers, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/child_with_nullable.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/child_with_nullable.dart index 496b79b9eaee..c6fa79a2d3d1 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/child_with_nullable.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/child_with_nullable.dart @@ -119,7 +119,6 @@ class _$ChildWithNullableSerializer implements PrimitiveSerializer { } } - @override ClassModel deserialize( Serializers serializers, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/deprecated_object.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/deprecated_object.dart index 1868473fcdd2..95be04c41af2 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/deprecated_object.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/deprecated_object.dart @@ -87,7 +87,6 @@ class _$DeprecatedObjectSerializer implements PrimitiveSerializer { } } - @override Dog deserialize( Serializers serializers, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/enum_arrays.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/enum_arrays.dart index 9dfc3358afd5..39522f2ebd6b 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/enum_arrays.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/enum_arrays.dart @@ -108,7 +108,6 @@ class _$EnumArraysSerializer implements PrimitiveSerializer { } } - @override EnumArrays deserialize( Serializers serializers, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/enum_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/enum_test.dart index 5b13970f3ea8..d092b7381f78 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/enum_test.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/enum_test.dart @@ -229,7 +229,6 @@ class _$EnumTestSerializer implements PrimitiveSerializer { } } - @override EnumTest deserialize( Serializers serializers, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/fake_big_decimal_map200_response.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/fake_big_decimal_map200_response.dart index e76f2596823d..1e72bea133f6 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/fake_big_decimal_map200_response.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/fake_big_decimal_map200_response.dart @@ -106,7 +106,6 @@ class _$FakeBigDecimalMap200ResponseSerializer implements PrimitiveSerializer { } } - @override Foo deserialize( Serializers serializers, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/foo_get_default_response.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/foo_get_default_response.dart index 63ad3cacd097..b0cf5e1a7653 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/foo_get_default_response.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/foo_get_default_response.dart @@ -87,7 +87,6 @@ class _$FooGetDefaultResponseSerializer implements PrimitiveSerializer { } } - @override FormatTest deserialize( Serializers serializers, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/has_only_read_only.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/has_only_read_only.dart index a2110c3387f9..0b3a33957f1d 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/has_only_read_only.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/has_only_read_only.dart @@ -105,7 +105,6 @@ class _$HasOnlyReadOnlySerializer implements PrimitiveSerializer { } } - @override MapTest deserialize( Serializers serializers, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/mixed_properties_and_additional_properties_class.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/mixed_properties_and_additional_properties_class.dart index c8a23458ee7b..e273c5d41f64 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/mixed_properties_and_additional_properties_class.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/mixed_properties_and_additional_properties_class.dart @@ -126,7 +126,6 @@ class _$MixedPropertiesAndAdditionalPropertiesClassSerializer implements Primiti } } - @override MixedPropertiesAndAdditionalPropertiesClass deserialize( Serializers serializers, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/model200_response.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/model200_response.dart index 9722a7325348..caa3ee46a168 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/model200_response.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/model200_response.dart @@ -105,7 +105,6 @@ class _$Model200ResponseSerializer implements PrimitiveSerializer { } } - @override ModelClient deserialize( Serializers serializers, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/model_file.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/model_file.dart index 84f2604ad1c5..7963e77bf370 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/model_file.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/model_file.dart @@ -87,7 +87,6 @@ class _$ModelFileSerializer implements PrimitiveSerializer { } } - @override ModelFile deserialize( Serializers serializers, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/model_list.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/model_list.dart index 021b8937c306..e94bca4b473d 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/model_list.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/model_list.dart @@ -86,7 +86,6 @@ class _$ModelListSerializer implements PrimitiveSerializer { } } - @override ModelList deserialize( Serializers serializers, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/model_return.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/model_return.dart index 37a5afb49306..97f946cbafc2 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/model_return.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/model_return.dart @@ -86,7 +86,6 @@ class _$ModelReturnSerializer implements PrimitiveSerializer { } } - @override ModelReturn deserialize( Serializers serializers, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/name.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/name.dart index 1b0be80d0218..f46233ed5d4c 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/name.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/name.dart @@ -140,7 +140,6 @@ class _$NameSerializer implements PrimitiveSerializer { } } - @override Name deserialize( Serializers serializers, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/nullable_class.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/nullable_class.dart index 43e98d3af680..9b9f2cbe3085 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/nullable_class.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/nullable_class.dart @@ -298,7 +298,6 @@ class _$NullableClassSerializer implements PrimitiveSerializer { } } - @override NullableClass deserialize( Serializers serializers, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/number_only.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/number_only.dart index 11c059610dfd..52b03c08d9b9 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/number_only.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/number_only.dart @@ -86,7 +86,6 @@ class _$NumberOnlySerializer implements PrimitiveSerializer { } } - @override NumberOnly deserialize( Serializers serializers, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/object_that_references_objects_with_duplicate_inline_enums.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/object_that_references_objects_with_duplicate_inline_enums.dart index 8a8167ae83b7..13e391810dd9 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/object_that_references_objects_with_duplicate_inline_enums.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/object_that_references_objects_with_duplicate_inline_enums.dart @@ -107,7 +107,6 @@ class _$ObjectThatReferencesObjectsWithDuplicateInlineEnumsSerializer implements } } - @override ObjectThatReferencesObjectsWithDuplicateInlineEnums deserialize( Serializers serializers, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/object_with_deprecated_fields.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/object_with_deprecated_fields.dart index 605ca2887f32..28aa18a84e6b 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/object_with_deprecated_fields.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/object_with_deprecated_fields.dart @@ -148,7 +148,6 @@ class _$ObjectWithDeprecatedFieldsSerializer implements PrimitiveSerializer } } - @override ObjectWithEnum deserialize( Serializers serializers, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/object_with_inline_enum.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/object_with_inline_enum.dart index 19182c7eb50d..084f82f228ff 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/object_with_inline_enum.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/object_with_inline_enum.dart @@ -89,7 +89,6 @@ class _$ObjectWithInlineEnumSerializer implements PrimitiveSerializer { } } - @override Order deserialize( Serializers serializers, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/outer_composite.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/outer_composite.dart index 53f0668e996f..ea16227a082f 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/outer_composite.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/outer_composite.dart @@ -124,7 +124,6 @@ class _$OuterCompositeSerializer implements PrimitiveSerializer } } - @override OuterComposite deserialize( Serializers serializers, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/outer_object_with_enum_property.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/outer_object_with_enum_property.dart index bab69cae9e60..173329856452 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/outer_object_with_enum_property.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/outer_object_with_enum_property.dart @@ -85,7 +85,6 @@ class _$OuterObjectWithEnumPropertySerializer implements PrimitiveSerializer { } } - @override Pet deserialize( Serializers serializers, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/read_only_first.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/read_only_first.dart index 30b1323daff1..15573ba09131 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/read_only_first.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/read_only_first.dart @@ -105,7 +105,6 @@ class _$ReadOnlyFirstSerializer implements PrimitiveSerializer { } } - @override ReadOnlyFirst deserialize( Serializers serializers, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/special_model_name.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/special_model_name.dart index 401f7268599c..45fdabd0504f 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/special_model_name.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/special_model_name.dart @@ -86,7 +86,6 @@ class _$SpecialModelNameSerializer implements PrimitiveSerializer { } } - @override Tag deserialize( Serializers serializers, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/test_inline_freeform_additional_properties_request.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/test_inline_freeform_additional_properties_request.dart index 8672a7ae8b91..73e51e23b7cb 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/test_inline_freeform_additional_properties_request.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/test_inline_freeform_additional_properties_request.dart @@ -88,7 +88,6 @@ class _$TestInlineFreeformAdditionalPropertiesRequestSerializer implements Primi } } - @override TestInlineFreeformAdditionalPropertiesRequest deserialize( Serializers serializers, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/user.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/user.dart index 2c30f952961a..d74169b24d98 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/user.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/user.dart @@ -220,7 +220,6 @@ class _$UserSerializer implements PrimitiveSerializer { } } - @override User deserialize( Serializers serializers, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/serializers.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/serializers.dart index 32c32792ab56..f55ca699ac78 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/serializers.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/serializers.dart @@ -136,34 +136,6 @@ Serializers serializers = (_$serializers.toBuilder() const FullType(BuiltMap, [FullType(String), FullType(String)]), () => MapBuilder(), ) - ..addBuilderFactory( - ) - ..addBuilderFactory( - const FullType(BuiltMap, [FullType(String), FullType(num)]), - () => MapBuilder(), - ) - ..addBuilderFactory( - const FullType(BuiltMap, [FullType(String), FullType(Animal)]), - () => MapBuilder(), - ) - ..addBuilderFactory( - const FullType(BuiltList, [FullType(ReadOnlyFirst)]), - () => ListBuilder(), - ) - ..addBuilderFactory( - ) - ..addBuilderFactory( - ) - ..addBuilderFactory( - const FullType(BuiltMap, [FullType(String), FullType(int)]), - () => MapBuilder(), - ) - ..addBuilderFactory( - ) - ..addBuilderFactory( - const FullType(BuiltList, [FullType(num)]), - () => ListBuilder(), - ) ..addBuilderFactory( const FullType(BuiltList, [FullType(User)]), () => ListBuilder(), @@ -172,8 +144,6 @@ Serializers serializers = (_$serializers.toBuilder() const FullType(BuiltSet, [FullType(String)]), () => SetBuilder(), ) - ..addBuilderFactory( - ) ..addBuilderFactory( const FullType(BuiltSet, [FullType(Pet)]), () => SetBuilder(), @@ -182,45 +152,21 @@ Serializers serializers = (_$serializers.toBuilder() const FullType(BuiltList, [FullType(Pet)]), () => ListBuilder(), ) - ..addBuilderFactory( - const FullType(BuiltList, [FullType(JsonObject)]), - () => ListBuilder(), - ) - ..addBuilderFactory( - const FullType(BuiltList, [FullType(ModelEnumClass)]), - () => ListBuilder(), - ) - ..addBuilderFactory( - const FullType(BuiltList, [FullType.nullable(JsonObject)]), - () => ListBuilder(), - ) - ..addBuilderFactory( - const FullType(BuiltList, [FullType(Tag)]), - () => ListBuilder(), - ) - ..addBuilderFactory( - const FullType(BuiltList, [FullType(ModelFile)]), - () => ListBuilder(), - ) - ..addBuilderFactory( - const FullType(BuiltList, [FullType(int)]), - () => ListBuilder(), - ) ..addBuilderFactory( const FullType(BuiltMap, [FullType(String), FullType.nullable(JsonObject)]), () => MapBuilder(), ) ..addBuilderFactory( - const FullType(BuiltMap, [FullType(String), FullType(bool)]), - () => MapBuilder(), + const FullType(BuiltMap, [FullType(String), FullType(int)]), + () => MapBuilder(), ) ..addBuilderFactory( - const FullType(BuiltList, [FullType(String)]), - () => ListBuilder(), + const FullType(BuiltList, [FullType(ModelEnumClass)]), + () => ListBuilder(), ) ..addBuilderFactory( - const FullType(BuiltMap, [FullType(String), FullType(JsonObject)]), - () => MapBuilder(), + const FullType(BuiltList, [FullType(String)]), + () => ListBuilder(), ) ..add(Animal.serializer) ..add(ParentWithNullable.serializer)