diff --git a/modules/openapi-generator/src/main/resources/dart2/dart_constructor.mustache b/modules/openapi-generator/src/main/resources/dart2/dart_constructor.mustache new file mode 100644 index 00000000000..af2f2a0e285 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/dart2/dart_constructor.mustache @@ -0,0 +1,10 @@ + /// Returns a new [{{{classname}}}] instance. + {{{classname}}}({ + {{#vars}} + {{! + A field is @required in Dart when it is + required && !nullable && !defaultValue in OAS + }} + {{#required}}{{^isNullable}}{{^defaultValue}}@required {{/defaultValue}}{{/isNullable}}{{/required}}this.{{{name}}}{{^isNullable}}{{#defaultValue}} = {{#isEnum}}{{^isContainer}}const {{{enumName}}}._({{/isContainer}}{{/isEnum}}{{{defaultValue}}}{{#isEnum}}{{^isContainer}}){{/isContainer}}{{/isEnum}}{{/defaultValue}}{{/isNullable}}, + {{/vars}} + }); \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/dart2/model.mustache b/modules/openapi-generator/src/main/resources/dart2/model.mustache index 4bebe06e9e4..9c738da279b 100644 --- a/modules/openapi-generator/src/main/resources/dart2/model.mustache +++ b/modules/openapi-generator/src/main/resources/dart2/model.mustache @@ -3,10 +3,20 @@ {{#models}} {{#model}} {{#isEnum}} -{{>enum}} +{{#native_serialization}} +{{>serialization/native/native_enum}} +{{/native_serialization}} +{{#json_serializable}} +{{>serialization/json_serializable/json_serializable_enum}} +{{/json_serializable}} {{/isEnum}} {{^isEnum}} -{{>class}} +{{#native_serialization}} +{{>serialization/native/native_class}} +{{/native_serialization}} +{{#json_serializable}} +{{>serialization/json_serializable/json_serializable_class}} +{{/json_serializable}} {{/isEnum}} {{/model}} {{/models}} diff --git a/modules/openapi-generator/src/main/resources/dart2/serialization/json_serializable/json_serializable_class.mustache b/modules/openapi-generator/src/main/resources/dart2/serialization/json_serializable/json_serializable_class.mustache new file mode 100644 index 00000000000..3a9ff0362b3 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/dart2/serialization/json_serializable/json_serializable_class.mustache @@ -0,0 +1,70 @@ +@JsonSerializable( + checked: true, + createToJson: true, + disallowUnrecognizedKeys: true, + explicitToJson: true, +) +class {{{classname}}} { +{{>dart_constructor}} + +{{#vars}} + {{#description}} + /// {{{description}}} + {{/description}} + {{^isEnum}} + {{#minimum}} + // minimum: {{{minimum}}} + {{/minimum}} + {{#maximum}} + // maximum: {{{maximum}}} + {{/maximum}} + {{/isEnum}} + {{^isBinary}} + @JsonKey( + {{#defaultValue}}defaultValue: {{{defaultValue}}},{{/defaultValue}}{{^defaultValue}}nullable: {{isNullable}},{{/defaultValue}} + name: r'{{{baseName}}}', + required: {{#required}}true{{/required}}{{^required}}false{{/required}}, + ) + {{/isBinary}} + {{#isBinary}} + @JsonKey(ignore: true) + {{/isBinary}} + {{{datatypeWithEnum}}} {{{name}}}; + +{{/vars}} + @override + bool operator ==(Object other) => identical(this, other) || other is {{{classname}}} && + {{#vars}} + other.{{{name}}} == {{{name}}}{{^-last}} &&{{/-last}}{{#-last}};{{/-last}} + {{/vars}} + + @override + int get hashCode => + {{#vars}} + ({{{name}}} == null ? 0 : {{{name}}}.hashCode){{^-last}} +{{/-last}}{{#-last}};{{/-last}} + {{/vars}} + + factory {{{classname}}}.fromJson(Map json) => _${{{classname}}}FromJson(json); + + Map toJson() => _${{{classname}}}ToJson(this); + + @override + String toString() { + return toJson().toString(); + } + +} +{{#vars}} + {{#isEnum}} + {{^isContainer}} + +{{>serialization/json_serializable/json_serializable_enum_inline}} + {{/isContainer}} + {{#isContainer}} + {{#mostInnerItems}} + +{{>serialization/json_serializable/json_serializable_enum_inline}} + {{/mostInnerItems}} + {{/isContainer}} + {{/isEnum}} +{{/vars}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/dart2/serialization/json_serializable/json_serializable_enum.mustache b/modules/openapi-generator/src/main/resources/dart2/serialization/json_serializable/json_serializable_enum.mustache new file mode 100644 index 00000000000..3fe458ab91f --- /dev/null +++ b/modules/openapi-generator/src/main/resources/dart2/serialization/json_serializable/json_serializable_enum.mustache @@ -0,0 +1,7 @@ +enum {{{classname}}} { +{{#allowableValues}} +{{#enumVars}} + {{{name}}}, +{{/enumVars}} +{{/allowableValues}} +} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/dart2/serialization/json_serializable/json_serializable_enum_inline.mustache b/modules/openapi-generator/src/main/resources/dart2/serialization/json_serializable/json_serializable_enum_inline.mustache new file mode 100644 index 00000000000..5249f86b398 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/dart2/serialization/json_serializable/json_serializable_enum_inline.mustache @@ -0,0 +1,8 @@ +{{#description}}/// {{{description}}}{{/description}} +enum {{{enumName}}} { +{{#allowableValues}} +{{#enumVars}} + {{{name}}}, +{{/enumVars}} +{{/allowableValues}} +} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/dart2/class.mustache b/modules/openapi-generator/src/main/resources/dart2/serialization/native/native_class.mustache similarity index 80% rename from modules/openapi-generator/src/main/resources/dart2/class.mustache rename to modules/openapi-generator/src/main/resources/dart2/serialization/native/native_class.mustache index f65bce93991..0e4520d3e98 100644 --- a/modules/openapi-generator/src/main/resources/dart2/class.mustache +++ b/modules/openapi-generator/src/main/resources/dart2/serialization/native/native_class.mustache @@ -1,24 +1,6 @@ -{{#json_serializable}} -@JsonSerializable( - checked: true, - createToJson: true, - disallowUnrecognizedKeys: true, - explicitToJson: true, -) -{{/json_serializable}} class {{{classname}}} { - /// Returns a new [{{{classname}}}] instance. - {{{classname}}}({ - {{#vars}} - {{! - A field is @required in Dart when it is - required && !nullable && !defaultValue in OAS - }} - {{#required}}{{^isNullable}}{{^defaultValue}}@required {{/defaultValue}}{{/isNullable}}{{/required}}this.{{{name}}}{{^isNullable}}{{#defaultValue}} = {{#isEnum}}{{^isContainer}}const {{{enumName}}}._({{/isContainer}}{{/isEnum}}{{{defaultValue}}}{{#isEnum}}{{^isContainer}}){{/isContainer}}{{/isEnum}}{{/defaultValue}}{{/isNullable}}, - {{/vars}} - }); +{{>dart_constructor}} -{{^json_serializable}} {{#vars}} {{#description}} /// {{{description}}} @@ -34,34 +16,6 @@ class {{{classname}}} { {{{datatypeWithEnum}}} {{{name}}}; {{/vars}} -{{/json_serializable}} -{{#json_serializable}} -{{#vars}} - {{#description}} - /// {{{description}}} - {{/description}} - {{^isEnum}} - {{#minimum}} - // minimum: {{{minimum}}} - {{/minimum}} - {{#maximum}} - // maximum: {{{maximum}}} - {{/maximum}} - {{/isEnum}} - {{^isBinary}} - @JsonKey( - {{#defaultValue}}defaultValue: {{{defaultValue}}},{{/defaultValue}}{{^defaultValue}}nullable: {{isNullable}},{{/defaultValue}} - name: r'{{{baseName}}}', - required: {{#required}}true{{/required}}{{^required}}false{{/required}}, - ) - {{/isBinary}} - {{#isBinary}} - @JsonKey(ignore: true) - {{/isBinary}} - {{{datatypeWithEnum}}} {{{name}}}; - -{{/vars}} -{{/json_serializable}} @override bool operator ==(Object other) => identical(this, other) || other is {{{classname}}} && {{#vars}} @@ -74,7 +28,6 @@ class {{{classname}}} { ({{{name}}} == null ? 0 : {{{name}}}.hashCode){{^-last}} +{{/-last}}{{#-last}};{{/-last}} {{/vars}} -{{^json_serializable}} @override String toString() => '{{{classname}}}[{{#vars}}{{{name}}}=${{{name}}}{{^-last}}, {{/-last}}{{/vars}}]'; @@ -256,30 +209,17 @@ class {{{classname}}} { } return map; } -{{/json_serializable}} -{{#json_serializable}} - - factory {{{classname}}}.fromJson(Map json) => _${{{classname}}}FromJson(json); - - Map toJson() => _${{{classname}}}ToJson(this); - - @override - String toString() { - return toJson().toString(); - } - -{{/json_serializable}} } {{#vars}} {{#isEnum}} {{^isContainer}} -{{>enum_inline}} +{{>serialization/native/native_enum_inline}} {{/isContainer}} {{#isContainer}} {{#mostInnerItems}} -{{>enum_inline}} +{{>serialization/native/native_enum_inline}} {{/mostInnerItems}} {{/isContainer}} {{/isEnum}} diff --git a/modules/openapi-generator/src/main/resources/dart2/enum.mustache b/modules/openapi-generator/src/main/resources/dart2/serialization/native/native_enum.mustache similarity index 91% rename from modules/openapi-generator/src/main/resources/dart2/enum.mustache rename to modules/openapi-generator/src/main/resources/dart2/serialization/native/native_enum.mustache index 6035ec4897e..d3ba3f350a8 100644 --- a/modules/openapi-generator/src/main/resources/dart2/enum.mustache +++ b/modules/openapi-generator/src/main/resources/dart2/serialization/native/native_enum.mustache @@ -1,5 +1,4 @@ {{#description}}/// {{{description}}}{{/description}} -{{^json_serializable}} class {{{classname}}} { /// Instantiate a new enum with the provided [value]. const {{{classname}}}._(this.value); @@ -72,12 +71,4 @@ class {{{classname}}}TypeTransformer { /// Singleton [{{{classname}}}TypeTransformer] instance. static {{{classname}}}TypeTransformer _instance; -}{{/json_serializable}}{{#json_serializable}} -enum {{{classname}}} { - {{#allowableValues}} - {{#enumVars}} - {{{name}}}, - {{/enumVars}} - {{/allowableValues}} -} -{{/json_serializable}} \ No newline at end of file +} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/dart2/enum_inline.mustache b/modules/openapi-generator/src/main/resources/dart2/serialization/native/native_enum_inline.mustache similarity index 92% rename from modules/openapi-generator/src/main/resources/dart2/enum_inline.mustache rename to modules/openapi-generator/src/main/resources/dart2/serialization/native/native_enum_inline.mustache index 2aebe1b2a91..d14c5a5648a 100644 --- a/modules/openapi-generator/src/main/resources/dart2/enum_inline.mustache +++ b/modules/openapi-generator/src/main/resources/dart2/serialization/native/native_enum_inline.mustache @@ -1,5 +1,4 @@ {{#description}}/// {{{description}}}{{/description}} -{{^json_serializable}} class {{{enumName}}} { /// Instantiate a new enum with the provided [value]. const {{{enumName}}}._(this.value); @@ -72,11 +71,4 @@ class {{{enumName}}}TypeTransformer { /// Singleton [{{{enumName}}}TypeTransformer] instance. static {{{enumName}}}TypeTransformer _instance; -}{{/json_serializable}}{{#json_serializable}} -enum {{{enumName}}} { -{{#allowableValues}} -{{#enumVars}} - {{{name}}}, -{{/enumVars}} -{{/allowableValues}} -}{{/json_serializable}} \ No newline at end of file +} \ No newline at end of file diff --git a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/additional_properties_class.dart b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/additional_properties_class.dart index 558e7f204a3..3d89437b45f 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/additional_properties_class.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/additional_properties_class.dart @@ -46,7 +46,6 @@ class AdditionalPropertiesClass { (mapProperty == null ? 0 : mapProperty.hashCode) + (mapOfMapProperty == null ? 0 : mapOfMapProperty.hashCode); - factory AdditionalPropertiesClass.fromJson(Map json) => _$AdditionalPropertiesClassFromJson(json); Map toJson() => _$AdditionalPropertiesClassToJson(this); diff --git a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/animal.dart b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/animal.dart index b73140cc066..007faa9351d 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/animal.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/animal.dart @@ -46,7 +46,6 @@ class Animal { (className == null ? 0 : className.hashCode) + (color == null ? 0 : color.hashCode); - factory Animal.fromJson(Map json) => _$AnimalFromJson(json); Map toJson() => _$AnimalToJson(this); diff --git a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/api_response.dart b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/api_response.dart index 414cd202987..15d9ef8dd4b 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/api_response.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/api_response.dart @@ -56,7 +56,6 @@ class ApiResponse { (type == null ? 0 : type.hashCode) + (message == null ? 0 : message.hashCode); - factory ApiResponse.fromJson(Map json) => _$ApiResponseFromJson(json); Map toJson() => _$ApiResponseToJson(this); diff --git a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/array_of_array_of_number_only.dart b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/array_of_array_of_number_only.dart index e8d735fde05..f9ab4b487ee 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/array_of_array_of_number_only.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/array_of_array_of_number_only.dart @@ -36,7 +36,6 @@ class ArrayOfArrayOfNumberOnly { int get hashCode => (arrayArrayNumber == null ? 0 : arrayArrayNumber.hashCode); - factory ArrayOfArrayOfNumberOnly.fromJson(Map json) => _$ArrayOfArrayOfNumberOnlyFromJson(json); Map toJson() => _$ArrayOfArrayOfNumberOnlyToJson(this); diff --git a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/array_of_number_only.dart b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/array_of_number_only.dart index bf821233a35..4d27ea30055 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/array_of_number_only.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/array_of_number_only.dart @@ -36,7 +36,6 @@ class ArrayOfNumberOnly { int get hashCode => (arrayNumber == null ? 0 : arrayNumber.hashCode); - factory ArrayOfNumberOnly.fromJson(Map json) => _$ArrayOfNumberOnlyFromJson(json); Map toJson() => _$ArrayOfNumberOnlyToJson(this); diff --git a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/array_test.dart b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/array_test.dart index e155c201c7c..d3363409d02 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/array_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/array_test.dart @@ -56,7 +56,6 @@ class ArrayTest { (arrayArrayOfInteger == null ? 0 : arrayArrayOfInteger.hashCode) + (arrayArrayOfModel == null ? 0 : arrayArrayOfModel.hashCode); - factory ArrayTest.fromJson(Map json) => _$ArrayTestFromJson(json); Map toJson() => _$ArrayTestToJson(this); diff --git a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/capitalization.dart b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/capitalization.dart index 774e4a0aa04..f559b327cbd 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/capitalization.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/capitalization.dart @@ -87,7 +87,6 @@ class Capitalization { (sCAETHFlowPoints == null ? 0 : sCAETHFlowPoints.hashCode) + (ATT_NAME == null ? 0 : ATT_NAME.hashCode); - factory Capitalization.fromJson(Map json) => _$CapitalizationFromJson(json); Map toJson() => _$CapitalizationToJson(this); diff --git a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/cat.dart b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/cat.dart index 6fc7a1fe3f0..c0c70cfe67f 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/cat.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/cat.dart @@ -56,7 +56,6 @@ class Cat { (color == null ? 0 : color.hashCode) + (declawed == null ? 0 : declawed.hashCode); - factory Cat.fromJson(Map json) => _$CatFromJson(json); Map toJson() => _$CatToJson(this); diff --git a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/cat_all_of.dart b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/cat_all_of.dart index 3fd7c8d0c49..c9758d9df38 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/cat_all_of.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/cat_all_of.dart @@ -36,7 +36,6 @@ class CatAllOf { int get hashCode => (declawed == null ? 0 : declawed.hashCode); - factory CatAllOf.fromJson(Map json) => _$CatAllOfFromJson(json); Map toJson() => _$CatAllOfToJson(this); diff --git a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/category.dart b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/category.dart index 1943448babd..a55587bb2c1 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/category.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/category.dart @@ -46,7 +46,6 @@ class Category { (id == null ? 0 : id.hashCode) + (name == null ? 0 : name.hashCode); - factory Category.fromJson(Map json) => _$CategoryFromJson(json); Map toJson() => _$CategoryToJson(this); diff --git a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/class_model.dart b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/class_model.dart index 7aee6bcac8d..0b4e4fa4718 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/class_model.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/class_model.dart @@ -36,7 +36,6 @@ class ClassModel { int get hashCode => (class_ == null ? 0 : class_.hashCode); - factory ClassModel.fromJson(Map json) => _$ClassModelFromJson(json); Map toJson() => _$ClassModelToJson(this); diff --git a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/dog.dart b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/dog.dart index dc7b2bd0386..1ec4ba53d02 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/dog.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/dog.dart @@ -56,7 +56,6 @@ class Dog { (color == null ? 0 : color.hashCode) + (breed == null ? 0 : breed.hashCode); - factory Dog.fromJson(Map json) => _$DogFromJson(json); Map toJson() => _$DogToJson(this); diff --git a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/dog_all_of.dart b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/dog_all_of.dart index ea5d4425121..7dc79a08a50 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/dog_all_of.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/dog_all_of.dart @@ -36,7 +36,6 @@ class DogAllOf { int get hashCode => (breed == null ? 0 : breed.hashCode); - factory DogAllOf.fromJson(Map json) => _$DogAllOfFromJson(json); Map toJson() => _$DogAllOfToJson(this); diff --git a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/enum_arrays.dart b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/enum_arrays.dart index d39f69699d8..a12d0045f4d 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/enum_arrays.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/enum_arrays.dart @@ -46,7 +46,6 @@ class EnumArrays { (justSymbol == null ? 0 : justSymbol.hashCode) + (arrayEnum == null ? 0 : arrayEnum.hashCode); - factory EnumArrays.fromJson(Map json) => _$EnumArraysFromJson(json); Map toJson() => _$EnumArraysToJson(this); @@ -59,14 +58,12 @@ class EnumArrays { } - enum EnumArraysJustSymbolEnum { greaterThanEqual, dollar, } - enum EnumArraysArrayEnumEnum { fish, crab, diff --git a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/enum_class.dart b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/enum_class.dart index ac886d3260c..391c2c83ba7 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/enum_class.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/enum_class.dart @@ -9,11 +9,8 @@ part of openapi.api; - - enum EnumClass { - abc, - efg, - leftParenthesisXyzRightParenthesis, + abc, + efg, + leftParenthesisXyzRightParenthesis, } - diff --git a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/enum_test.dart b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/enum_test.dart index 7389cf1246b..421da9523c2 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/enum_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/enum_test.dart @@ -106,7 +106,6 @@ class EnumTest { (outerEnumDefaultValue == null ? 0 : outerEnumDefaultValue.hashCode) + (outerEnumIntegerDefaultValue == null ? 0 : outerEnumIntegerDefaultValue.hashCode); - factory EnumTest.fromJson(Map json) => _$EnumTestFromJson(json); Map toJson() => _$EnumTestToJson(this); @@ -119,7 +118,6 @@ class EnumTest { } - enum EnumTestEnumStringEnum { UPPER, lower, @@ -127,7 +125,6 @@ enum EnumTestEnumStringEnum { } - enum EnumTestEnumStringRequiredEnum { UPPER, lower, @@ -135,14 +132,12 @@ enum EnumTestEnumStringRequiredEnum { } - enum EnumTestEnumIntegerEnum { number1, numberNegative1, } - enum EnumTestEnumNumberEnum { number1Period1, numberNegative1Period2, diff --git a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/file_schema_test_class.dart b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/file_schema_test_class.dart index d3c07377d13..c994f6088e1 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/file_schema_test_class.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/file_schema_test_class.dart @@ -46,7 +46,6 @@ class FileSchemaTestClass { (file == null ? 0 : file.hashCode) + (files == null ? 0 : files.hashCode); - factory FileSchemaTestClass.fromJson(Map json) => _$FileSchemaTestClassFromJson(json); Map toJson() => _$FileSchemaTestClassToJson(this); diff --git a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/foo.dart b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/foo.dart index 47375d9f05a..af23e19a358 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/foo.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/foo.dart @@ -36,7 +36,6 @@ class Foo { int get hashCode => (bar == null ? 0 : bar.hashCode); - factory Foo.fromJson(Map json) => _$FooFromJson(json); Map toJson() => _$FooToJson(this); diff --git a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/format_test.dart b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/format_test.dart index 23e4fe87051..d126d55673f 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/format_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/format_test.dart @@ -194,7 +194,6 @@ class FormatTest { (patternWithDigits == null ? 0 : patternWithDigits.hashCode) + (patternWithDigitsAndDelimiter == null ? 0 : patternWithDigitsAndDelimiter.hashCode); - factory FormatTest.fromJson(Map json) => _$FormatTestFromJson(json); Map toJson() => _$FormatTestToJson(this); diff --git a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/has_only_read_only.dart b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/has_only_read_only.dart index 75e18e568ae..d4138d9e314 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/has_only_read_only.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/has_only_read_only.dart @@ -46,7 +46,6 @@ class HasOnlyReadOnly { (bar == null ? 0 : bar.hashCode) + (foo == null ? 0 : foo.hashCode); - factory HasOnlyReadOnly.fromJson(Map json) => _$HasOnlyReadOnlyFromJson(json); Map toJson() => _$HasOnlyReadOnlyToJson(this); diff --git a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/health_check_result.dart b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/health_check_result.dart index 506c7312ea0..acdbcc10877 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/health_check_result.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/health_check_result.dart @@ -36,7 +36,6 @@ class HealthCheckResult { int get hashCode => (nullableMessage == null ? 0 : nullableMessage.hashCode); - factory HealthCheckResult.fromJson(Map json) => _$HealthCheckResultFromJson(json); Map toJson() => _$HealthCheckResultToJson(this); diff --git a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/inline_response_default.dart b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/inline_response_default.dart index bff0a6ea80b..a205e74866c 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/inline_response_default.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/inline_response_default.dart @@ -36,7 +36,6 @@ class InlineResponseDefault { int get hashCode => (string == null ? 0 : string.hashCode); - factory InlineResponseDefault.fromJson(Map json) => _$InlineResponseDefaultFromJson(json); Map toJson() => _$InlineResponseDefaultToJson(this); diff --git a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/map_test.dart b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/map_test.dart index 034e4c6ab16..0749f10b998 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/map_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/map_test.dart @@ -66,7 +66,6 @@ class MapTest { (directMap == null ? 0 : directMap.hashCode) + (indirectMap == null ? 0 : indirectMap.hashCode); - factory MapTest.fromJson(Map json) => _$MapTestFromJson(json); Map toJson() => _$MapTestToJson(this); @@ -79,7 +78,6 @@ class MapTest { } - enum MapTestMapOfEnumStringEnum { UPPER, lower, diff --git a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/mixed_properties_and_additional_properties_class.dart b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/mixed_properties_and_additional_properties_class.dart index 7f6305f2195..91fca43d388 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/mixed_properties_and_additional_properties_class.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/mixed_properties_and_additional_properties_class.dart @@ -56,7 +56,6 @@ class MixedPropertiesAndAdditionalPropertiesClass { (dateTime == null ? 0 : dateTime.hashCode) + (map == null ? 0 : map.hashCode); - factory MixedPropertiesAndAdditionalPropertiesClass.fromJson(Map json) => _$MixedPropertiesAndAdditionalPropertiesClassFromJson(json); Map toJson() => _$MixedPropertiesAndAdditionalPropertiesClassToJson(this); diff --git a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/model200_response.dart b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/model200_response.dart index 282ee428418..77b72970d98 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/model200_response.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/model200_response.dart @@ -46,7 +46,6 @@ class Model200Response { (name == null ? 0 : name.hashCode) + (class_ == null ? 0 : class_.hashCode); - factory Model200Response.fromJson(Map json) => _$Model200ResponseFromJson(json); Map toJson() => _$Model200ResponseToJson(this); diff --git a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/model_client.dart b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/model_client.dart index 50336403c7c..5193315a39b 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/model_client.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/model_client.dart @@ -36,7 +36,6 @@ class ModelClient { int get hashCode => (client == null ? 0 : client.hashCode); - factory ModelClient.fromJson(Map json) => _$ModelClientFromJson(json); Map toJson() => _$ModelClientToJson(this); diff --git a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/model_file.dart b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/model_file.dart index 7065bab6fb9..7c8742d92da 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/model_file.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/model_file.dart @@ -37,7 +37,6 @@ class ModelFile { int get hashCode => (sourceURI == null ? 0 : sourceURI.hashCode); - factory ModelFile.fromJson(Map json) => _$ModelFileFromJson(json); Map toJson() => _$ModelFileToJson(this); diff --git a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/model_list.dart b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/model_list.dart index 55ac52ce234..7ea607d3eb4 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/model_list.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/model_list.dart @@ -36,7 +36,6 @@ class ModelList { int get hashCode => (n123list == null ? 0 : n123list.hashCode); - factory ModelList.fromJson(Map json) => _$ModelListFromJson(json); Map toJson() => _$ModelListToJson(this); diff --git a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/model_return.dart b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/model_return.dart index 583987a9672..6058870d576 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/model_return.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/model_return.dart @@ -36,7 +36,6 @@ class ModelReturn { int get hashCode => (return_ == null ? 0 : return_.hashCode); - factory ModelReturn.fromJson(Map json) => _$ModelReturnFromJson(json); Map toJson() => _$ModelReturnToJson(this); diff --git a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/name.dart b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/name.dart index f9916982eff..714d47df963 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/name.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/name.dart @@ -66,7 +66,6 @@ class Name { (property == null ? 0 : property.hashCode) + (n123number == null ? 0 : n123number.hashCode); - factory Name.fromJson(Map json) => _$NameFromJson(json); Map toJson() => _$NameToJson(this); diff --git a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/nullable_class.dart b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/nullable_class.dart index acbda5d7199..87b5a308b5b 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/nullable_class.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/nullable_class.dart @@ -146,7 +146,6 @@ class NullableClass { (objectAndItemsNullableProp == null ? 0 : objectAndItemsNullableProp.hashCode) + (objectItemsNullable == null ? 0 : objectItemsNullable.hashCode); - factory NullableClass.fromJson(Map json) => _$NullableClassFromJson(json); Map toJson() => _$NullableClassToJson(this); diff --git a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/number_only.dart b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/number_only.dart index eaa794ceed6..aacbd85e3de 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/number_only.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/number_only.dart @@ -36,7 +36,6 @@ class NumberOnly { int get hashCode => (justNumber == null ? 0 : justNumber.hashCode); - factory NumberOnly.fromJson(Map json) => _$NumberOnlyFromJson(json); Map toJson() => _$NumberOnlyToJson(this); diff --git a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/order.dart b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/order.dart index 6286697b172..73c52c14860 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/order.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/order.dart @@ -87,7 +87,6 @@ class Order { (status == null ? 0 : status.hashCode) + (complete == null ? 0 : complete.hashCode); - factory Order.fromJson(Map json) => _$OrderFromJson(json); Map toJson() => _$OrderToJson(this); @@ -100,7 +99,6 @@ class Order { } /// Order Status - enum OrderStatusEnum { placed, approved, diff --git a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/outer_composite.dart b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/outer_composite.dart index 2ecc5a2cc3b..e5edc3bc21a 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/outer_composite.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/outer_composite.dart @@ -56,7 +56,6 @@ class OuterComposite { (myString == null ? 0 : myString.hashCode) + (myBoolean == null ? 0 : myBoolean.hashCode); - factory OuterComposite.fromJson(Map json) => _$OuterCompositeFromJson(json); Map toJson() => _$OuterCompositeToJson(this); diff --git a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/outer_enum.dart b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/outer_enum.dart index a31f359e27f..1ba9c098494 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/outer_enum.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/outer_enum.dart @@ -9,11 +9,8 @@ part of openapi.api; - - enum OuterEnum { - placed, - approved, - delivered, + placed, + approved, + delivered, } - diff --git a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/outer_enum_default_value.dart b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/outer_enum_default_value.dart index af1b06d000c..7255a5c75ef 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/outer_enum_default_value.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/outer_enum_default_value.dart @@ -9,11 +9,8 @@ part of openapi.api; - - enum OuterEnumDefaultValue { - placed, - approved, - delivered, + placed, + approved, + delivered, } - diff --git a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/outer_enum_integer.dart b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/outer_enum_integer.dart index a4c734c5a39..45865586c47 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/outer_enum_integer.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/outer_enum_integer.dart @@ -9,11 +9,8 @@ part of openapi.api; - - enum OuterEnumInteger { - number0, - number1, - number2, + number0, + number1, + number2, } - diff --git a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/outer_enum_integer_default_value.dart b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/outer_enum_integer_default_value.dart index d37258cdada..66c8e1a8869 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/outer_enum_integer_default_value.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/outer_enum_integer_default_value.dart @@ -9,11 +9,8 @@ part of openapi.api; - - enum OuterEnumIntegerDefaultValue { - number0, - number1, - number2, + number0, + number1, + number2, } - diff --git a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/outer_object_with_enum_property.dart b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/outer_object_with_enum_property.dart index 0857bb708bb..fd9ea7cf80b 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/outer_object_with_enum_property.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/outer_object_with_enum_property.dart @@ -36,7 +36,6 @@ class OuterObjectWithEnumProperty { int get hashCode => (value == null ? 0 : value.hashCode); - factory OuterObjectWithEnumProperty.fromJson(Map json) => _$OuterObjectWithEnumPropertyFromJson(json); Map toJson() => _$OuterObjectWithEnumPropertyToJson(this); diff --git a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/pet.dart b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/pet.dart index 032d8ba77e6..422971a25b7 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/pet.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/pet.dart @@ -87,7 +87,6 @@ class Pet { (tags == null ? 0 : tags.hashCode) + (status == null ? 0 : status.hashCode); - factory Pet.fromJson(Map json) => _$PetFromJson(json); Map toJson() => _$PetToJson(this); @@ -100,7 +99,6 @@ class Pet { } /// pet status in the store - enum PetStatusEnum { available, pending, diff --git a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/read_only_first.dart b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/read_only_first.dart index 2a69d90d58e..84d626357ab 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/read_only_first.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/read_only_first.dart @@ -46,7 +46,6 @@ class ReadOnlyFirst { (bar == null ? 0 : bar.hashCode) + (baz == null ? 0 : baz.hashCode); - factory ReadOnlyFirst.fromJson(Map json) => _$ReadOnlyFirstFromJson(json); Map toJson() => _$ReadOnlyFirstToJson(this); diff --git a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/special_model_name.dart b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/special_model_name.dart index b856f4c28b3..de09411bd1d 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/special_model_name.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/special_model_name.dart @@ -36,7 +36,6 @@ class SpecialModelName { int get hashCode => (dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket == null ? 0 : dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket.hashCode); - factory SpecialModelName.fromJson(Map json) => _$SpecialModelNameFromJson(json); Map toJson() => _$SpecialModelNameToJson(this); diff --git a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/tag.dart b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/tag.dart index 50302654c15..f9e4a1dd9ee 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/tag.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/tag.dart @@ -46,7 +46,6 @@ class Tag { (id == null ? 0 : id.hashCode) + (name == null ? 0 : name.hashCode); - factory Tag.fromJson(Map json) => _$TagFromJson(json); Map toJson() => _$TagToJson(this); diff --git a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/user.dart b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/user.dart index e6cfe4e4a26..0c89dd53249 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/user.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/lib/model/user.dart @@ -107,7 +107,6 @@ class User { (phone == null ? 0 : phone.hashCode) + (userStatus == null ? 0 : userStatus.hashCode); - factory User.fromJson(Map json) => _$UserFromJson(json); Map toJson() => _$UserToJson(this);