diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java index 73132481e383..d7c8debe9885 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java @@ -606,6 +606,52 @@ protected CodegenDiscriminator createDiscriminator(String schemaName, Schema sch @Override public Map postProcessAllModels(Map objs) { objs = super.postProcessAllModels(objs); + + // For json_serializable, properly set up parent variables for inheritance + if (SERIALIZATION_LIBRARY_JSON_SERIALIZABLE.equals(library)) { + // Build a map of all models for quick lookup + Map allModelsMap = new HashMap<>(); + for (ModelsMap modelsEntries : objs.values()) { + for (ModelMap modelsMap : modelsEntries.getModels()) { + allModelsMap.put(modelsMap.getModel().getClassname(), modelsMap.getModel()); + } + } + + // Process models with inheritance + for (ModelsMap modelsEntries : objs.values()) { + for (ModelMap mo : modelsEntries.getModels()) { + CodegenModel cm = mo.getModel(); + + if (cm.getParent() != null && !cm.getParent().isEmpty()) { + LOGGER.debug("Processing inheritance for model: {} (extends: {})", cm.getClassname(), cm.getParent()); + + CodegenModel parentModel = allModelsMap.get(cm.getParent()); + + if (parentModel != null && parentModel.getVars() != null && !parentModel.getVars().isEmpty()) { + // Set parent variables + cm.setParentVars(parentModel.getVars()); + + // Remove parent properties from child's vars to avoid duplication + Set parentVarNames = cm.getParentVars().stream() + .map(CodegenProperty::getName) + .collect(Collectors.toSet()); + + cm.setVars(cm.getVars().stream() + .filter(p -> !parentVarNames.contains(p.getName())) + .collect(Collectors.toList()) + ); + + LOGGER.debug("Inheritance setup complete for {}: {} parent properties moved to parentVars", + cm.getClassname(), parentModel.getVars().size()); + } else { + LOGGER.warn("Parent model '{}' not found or has no properties for child model '{}'", + cm.getParent(), cm.getClassname()); + } + } + } + } + } + if (SERIALIZATION_LIBRARY_BUILT_VALUE.equals(library)) { adaptToDartInheritance(objs); syncRootTypesWithInnerVars(objs); diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/json_serializable/class.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/json_serializable/class.mustache index 73e37f9c373e..00dccb3ef856 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/json_serializable/class.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/json_serializable/class.mustache @@ -32,7 +32,7 @@ part '{{classFilename}}.g.dart'; disallowUnrecognizedKeys: false, explicitToJson: true, ) -class {{{classname}}} { +class {{{classname}}}{{#parent}} extends {{{parent}}}{{/parent}} { {{>serialization/json_serializable/dart_constructor}} @@ -89,14 +89,14 @@ class {{{classname}}} { runtimeType == other.runtimeType && equals( [ - {{#vars}} + {{#allVars}} {{{name}}}, - {{/vars}} + {{/allVars}} ], [ - {{#vars}} + {{#allVars}} other.{{{name}}}, - {{/vars}} + {{/allVars}} ] ); } @@ -105,25 +105,26 @@ class {{{classname}}} { {{^useEquatable}} @override bool operator ==(Object other) => identical(this, other) || other is {{{classname}}} && - {{#vars}} + runtimeType == other.runtimeType && + {{#allVars}} other.{{{name}}} == {{{name}}}{{^-last}} &&{{/-last}}{{#-last}};{{/-last}} - {{/vars}} + {{/allVars}} {{/useEquatable}} {{#useEquatable}} @override int get hashCode => runtimeType.hashCode ^ mapPropsToHashCode([ - {{#vars}} + {{#allVars}} {{{name}}}, - {{/vars}} + {{/allVars}} ],); {{/useEquatable}} {{^useEquatable}} @override int get hashCode => - {{#vars}} + {{#allVars}} {{#isNullable}}({{{name}}} == null ? 0 : {{{name}}}.hashCode){{/isNullable}}{{^isNullable}}{{{name}}}.hashCode{{/isNullable}}{{^-last}} +{{/-last}}{{#-last}};{{/-last}} - {{/vars}} + {{/allVars}} {{/useEquatable}} factory {{{classname}}}.fromJson(Map json) => _${{{classname}}}FromJson(json); diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/json_serializable/dart_constructor.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/json_serializable/dart_constructor.mustache index b96c0d361835..4df75f1a79ba 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/json_serializable/dart_constructor.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/json_serializable/dart_constructor.mustache @@ -1,11 +1,13 @@ - /// Returns a new [{{{classname}}}] instance. +/// Returns a new [{{{classname}}}] instance. {{{classname}}}({ - {{#vars}} - +{{#vars}} {{! A field is required in Dart when it is required && !defaultValue in OAS }} {{^required}}{{#useOptional}}this.{{{name}}}{{#defaultValue}} = const Optional.present({{#isEnum}}{{^isContainer}}const {{{enumName}}}._({{/isContainer}}{{/isEnum}}{{{defaultValue}}}{{#isEnum}}{{^isContainer}}){{/isContainer}}{{/isEnum}}){{/defaultValue}}{{^defaultValue}} = const Optional.absent(){{/defaultValue}},{{/useOptional}}{{/required}}{{^required}}{{^useOptional}} this.{{{name}}}{{#defaultValue}} = {{#isEnum}}{{^isContainer}}const {{{enumName}}}._({{/isContainer}}{{/isEnum}}{{{defaultValue}}}{{#isEnum}}{{^isContainer}}){{/isContainer}}{{/isEnum}}{{/defaultValue}},{{/useOptional}}{{/required}}{{#required}}{{^defaultValue}}required {{/defaultValue}}{{/required}}{{#required}} this.{{{name}}}{{#defaultValue}} = {{#isEnum}}{{^isContainer}}const {{{enumName}}}._({{/isContainer}}{{/isEnum}}{{{defaultValue}}}{{#isEnum}}{{^isContainer}}){{/isContainer}}{{/isEnum}}{{/defaultValue}},{{/required}} {{/vars}} +{{#parentVars}} + {{^required}}{{#useOptional}}super.{{{name}}}{{#defaultValue}} = const Optional.present({{#isEnum}}{{^isContainer}}const {{{enumName}}}._({{/isContainer}}{{/isEnum}}{{{defaultValue}}}{{#isEnum}}{{^isContainer}}){{/isContainer}}{{/isEnum}}){{/defaultValue}}{{^defaultValue}} = const Optional.absent(){{/defaultValue}},{{/useOptional}}{{/required}}{{^required}}{{^useOptional}} super.{{{name}}}{{#defaultValue}} = {{#isEnum}}{{^isContainer}}const {{{enumName}}}._({{/isContainer}}{{/isEnum}}{{{defaultValue}}}{{#isEnum}}{{^isContainer}}){{/isContainer}}{{/isEnum}}{{/defaultValue}},{{/useOptional}}{{/required}}{{#required}}{{^defaultValue}}required {{/defaultValue}}{{/required}}{{#required}} super.{{{name}}}{{#defaultValue}} = {{#isEnum}}{{^isContainer}}const {{{enumName}}}._({{/isContainer}}{{/isEnum}}{{{defaultValue}}}{{#isEnum}}{{^isContainer}}){{/isContainer}}{{/isEnum}}{{/defaultValue}},{{/required}} + {{/parentVars}} }); \ No newline at end of file diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/Cat.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/Cat.md index 6552eea4b435..c1c078d2b65e 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/Cat.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/Cat.md @@ -8,8 +8,6 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**className** | **String** | | -**color** | **String** | | [optional] [default to 'red'] **declawed** | **bool** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/ChildWithNullable.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/ChildWithNullable.md index 770494fcf4cc..c0cb6b933d9f 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/ChildWithNullable.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/ChildWithNullable.md @@ -8,8 +8,6 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **String** | | [optional] -**nullableProperty** | **String** | | [optional] **otherProperty** | **String** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/Dog.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/Dog.md index d36439b767bb..ef7ff6e8ac12 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/Dog.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/Dog.md @@ -8,8 +8,6 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**className** | **String** | | -**color** | **String** | | [optional] [default to 'red'] **breed** | **String** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/additional_properties_class.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/additional_properties_class.dart index cfbc5ef08f77..dd2b471c22af 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/additional_properties_class.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/additional_properties_class.dart @@ -17,13 +17,10 @@ part 'additional_properties_class.g.dart'; explicitToJson: true, ) class AdditionalPropertiesClass { - /// Returns a new [AdditionalPropertiesClass] instance. +/// Returns a new [AdditionalPropertiesClass] instance. AdditionalPropertiesClass({ - this.mapProperty, - this.mapOfMapProperty, - this.mapOfArrayInteger, }); @@ -67,6 +64,7 @@ class AdditionalPropertiesClass { @override bool operator ==(Object other) => identical(this, other) || other is AdditionalPropertiesClass && + runtimeType == other.runtimeType && other.mapProperty == mapProperty && other.mapOfMapProperty == mapOfMapProperty && other.mapOfArrayInteger == mapOfArrayInteger; diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/all_of_with_single_ref.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/all_of_with_single_ref.dart index 775b58a1fca6..9859a417c7a2 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/all_of_with_single_ref.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/all_of_with_single_ref.dart @@ -18,11 +18,9 @@ part 'all_of_with_single_ref.g.dart'; explicitToJson: true, ) class AllOfWithSingleRef { - /// Returns a new [AllOfWithSingleRef] instance. +/// Returns a new [AllOfWithSingleRef] instance. AllOfWithSingleRef({ - this.username, - this.singleRefType, }); @@ -55,6 +53,7 @@ class AllOfWithSingleRef { @override bool operator ==(Object other) => identical(this, other) || other is AllOfWithSingleRef && + runtimeType == other.runtimeType && other.username == username && other.singleRefType == singleRefType; diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/animal.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/animal.dart index c9abb12b9308..ce9c03aa0681 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/animal.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/animal.dart @@ -17,11 +17,9 @@ part 'animal.g.dart'; explicitToJson: true, ) class Animal { - /// Returns a new [Animal] instance. +/// Returns a new [Animal] instance. Animal({ - required this.className, - this.color = 'red', }); @@ -53,6 +51,7 @@ class Animal { @override bool operator ==(Object other) => identical(this, other) || other is Animal && + runtimeType == other.runtimeType && other.className == className && other.color == color; diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/api_response.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/api_response.dart index d1b0fa6294ee..c11b92f2ea1a 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/api_response.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/api_response.dart @@ -17,13 +17,10 @@ part 'api_response.g.dart'; explicitToJson: true, ) class ApiResponse { - /// Returns a new [ApiResponse] instance. +/// Returns a new [ApiResponse] instance. ApiResponse({ - this.code, - this.type, - this.message, }); @@ -67,6 +64,7 @@ class ApiResponse { @override bool operator ==(Object other) => identical(this, other) || other is ApiResponse && + runtimeType == other.runtimeType && other.code == code && other.type == type && other.message == message; diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/array_of_array_of_number_only.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/array_of_array_of_number_only.dart index e0e2d78b95b7..36679c9121f6 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/array_of_array_of_number_only.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/array_of_array_of_number_only.dart @@ -17,9 +17,8 @@ part 'array_of_array_of_number_only.g.dart'; explicitToJson: true, ) class ArrayOfArrayOfNumberOnly { - /// Returns a new [ArrayOfArrayOfNumberOnly] instance. +/// Returns a new [ArrayOfArrayOfNumberOnly] instance. ArrayOfArrayOfNumberOnly({ - this.arrayArrayNumber, }); @@ -39,6 +38,7 @@ class ArrayOfArrayOfNumberOnly { @override bool operator ==(Object other) => identical(this, other) || other is ArrayOfArrayOfNumberOnly && + runtimeType == other.runtimeType && other.arrayArrayNumber == arrayArrayNumber; @override diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/array_of_number_only.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/array_of_number_only.dart index 9d9e0a197a2f..814123300094 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/array_of_number_only.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/array_of_number_only.dart @@ -17,9 +17,8 @@ part 'array_of_number_only.g.dart'; explicitToJson: true, ) class ArrayOfNumberOnly { - /// Returns a new [ArrayOfNumberOnly] instance. +/// Returns a new [ArrayOfNumberOnly] instance. ArrayOfNumberOnly({ - this.arrayNumber, }); @@ -39,6 +38,7 @@ class ArrayOfNumberOnly { @override bool operator ==(Object other) => identical(this, other) || other is ArrayOfNumberOnly && + runtimeType == other.runtimeType && other.arrayNumber == arrayNumber; @override diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/array_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/array_test.dart index 30fdd53ab675..f88af5406a76 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/array_test.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/array_test.dart @@ -18,13 +18,10 @@ part 'array_test.g.dart'; explicitToJson: true, ) class ArrayTest { - /// Returns a new [ArrayTest] instance. +/// Returns a new [ArrayTest] instance. ArrayTest({ - this.arrayOfString, - this.arrayArrayOfInteger, - this.arrayArrayOfModel, }); @@ -68,6 +65,7 @@ class ArrayTest { @override bool operator ==(Object other) => identical(this, other) || other is ArrayTest && + runtimeType == other.runtimeType && other.arrayOfString == arrayOfString && other.arrayArrayOfInteger == arrayArrayOfInteger && other.arrayArrayOfModel == arrayArrayOfModel; diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/capitalization.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/capitalization.dart index c2327b44f125..036ea3a52bfd 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/capitalization.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/capitalization.dart @@ -17,19 +17,13 @@ part 'capitalization.g.dart'; explicitToJson: true, ) class Capitalization { - /// Returns a new [Capitalization] instance. +/// Returns a new [Capitalization] instance. Capitalization({ - this.smallCamel, - this.capitalCamel, - this.smallSnake, - this.capitalSnake, - this.sCAETHFlowPoints, - this.ATT_NAME, }); @@ -110,6 +104,7 @@ class Capitalization { @override bool operator ==(Object other) => identical(this, other) || other is Capitalization && + runtimeType == other.runtimeType && other.smallCamel == smallCamel && other.capitalCamel == capitalCamel && other.smallSnake == smallSnake && diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/cat.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/cat.dart index 05eebe01a67e..bc3567ca61a2 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/cat.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/cat.dart @@ -19,41 +19,14 @@ part 'cat.g.dart'; disallowUnrecognizedKeys: false, explicitToJson: true, ) -class Cat { - /// Returns a new [Cat] instance. +class Cat extends Animal { +/// Returns a new [Cat] instance. Cat({ - - required this.className, - - this.color = 'red', - this.declawed, + required super.className, + super.color = 'red', }); - @JsonKey( - - name: r'className', - required: true, - includeIfNull: false, - ) - - - final String className; - - - - @JsonKey( - defaultValue: 'red', - name: r'color', - required: false, - includeIfNull: false, - ) - - - final String? color; - - - @JsonKey( name: r'declawed', @@ -70,6 +43,7 @@ class Cat { @override bool operator ==(Object other) => identical(this, other) || other is Cat && + runtimeType == other.runtimeType && other.className == className && other.color == color && other.declawed == declawed; diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/category.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/category.dart index 35718dc06d5b..ec54786b2b6f 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/category.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/category.dart @@ -17,11 +17,9 @@ part 'category.g.dart'; explicitToJson: true, ) class Category { - /// Returns a new [Category] instance. +/// Returns a new [Category] instance. Category({ - this.id, - this.name = 'default-name', }); @@ -53,6 +51,7 @@ class Category { @override bool operator ==(Object other) => identical(this, other) || other is Category && + runtimeType == other.runtimeType && other.id == id && other.name == name; diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/child_with_nullable.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/child_with_nullable.dart index f0e430001673..aa0dcae122fa 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/child_with_nullable.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/child_with_nullable.dart @@ -19,41 +19,14 @@ part 'child_with_nullable.g.dart'; disallowUnrecognizedKeys: false, explicitToJson: true, ) -class ChildWithNullable { - /// Returns a new [ChildWithNullable] instance. +class ChildWithNullable extends ParentWithNullable { +/// Returns a new [ChildWithNullable] instance. ChildWithNullable({ - - this.type, - - this.nullableProperty, - this.otherProperty, + super.type, + super.nullableProperty, }); - @JsonKey( - - name: r'type', - required: false, - includeIfNull: false, - ) - - - final String? type; - - - - @JsonKey( - - name: r'nullableProperty', - required: false, - includeIfNull: false, - ) - - - final String? nullableProperty; - - - @JsonKey( name: r'otherProperty', @@ -70,6 +43,7 @@ class ChildWithNullable { @override bool operator ==(Object other) => identical(this, other) || other is ChildWithNullable && + runtimeType == other.runtimeType && other.type == type && other.nullableProperty == nullableProperty && other.otherProperty == otherProperty; diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/class_model.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/class_model.dart index 8802de37921e..ae809ca4f9a2 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/class_model.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/class_model.dart @@ -17,9 +17,8 @@ part 'class_model.g.dart'; explicitToJson: true, ) class ClassModel { - /// Returns a new [ClassModel] instance. +/// Returns a new [ClassModel] instance. ClassModel({ - this.class_, }); @@ -39,6 +38,7 @@ class ClassModel { @override bool operator ==(Object other) => identical(this, other) || other is ClassModel && + runtimeType == other.runtimeType && other.class_ == class_; @override diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/deprecated_object.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/deprecated_object.dart index 844cda541b83..8d086e58169f 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/deprecated_object.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/deprecated_object.dart @@ -18,9 +18,8 @@ part 'deprecated_object.g.dart'; explicitToJson: true, ) class DeprecatedObject { - /// Returns a new [DeprecatedObject] instance. +/// Returns a new [DeprecatedObject] instance. DeprecatedObject({ - this.name, }); @@ -40,6 +39,7 @@ class DeprecatedObject { @override bool operator ==(Object other) => identical(this, other) || other is DeprecatedObject && + runtimeType == other.runtimeType && other.name == name; @override diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/dog.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/dog.dart index 9dd6a37ffcee..4ca9a80b2a8f 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/dog.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/dog.dart @@ -19,41 +19,14 @@ part 'dog.g.dart'; disallowUnrecognizedKeys: false, explicitToJson: true, ) -class Dog { - /// Returns a new [Dog] instance. +class Dog extends Animal { +/// Returns a new [Dog] instance. Dog({ - - required this.className, - - this.color = 'red', - this.breed, + required super.className, + super.color = 'red', }); - @JsonKey( - - name: r'className', - required: true, - includeIfNull: false, - ) - - - final String className; - - - - @JsonKey( - defaultValue: 'red', - name: r'color', - required: false, - includeIfNull: false, - ) - - - final String? color; - - - @JsonKey( name: r'breed', @@ -70,6 +43,7 @@ class Dog { @override bool operator ==(Object other) => identical(this, other) || other is Dog && + runtimeType == other.runtimeType && other.className == className && other.color == color && other.breed == breed; diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/enum_arrays.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/enum_arrays.dart index b1d9f2942b1d..5049e81370a1 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/enum_arrays.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/enum_arrays.dart @@ -17,11 +17,9 @@ part 'enum_arrays.g.dart'; explicitToJson: true, ) class EnumArrays { - /// Returns a new [EnumArrays] instance. +/// Returns a new [EnumArrays] instance. EnumArrays({ - this.justSymbol, - this.arrayEnum, }); @@ -55,6 +53,7 @@ class EnumArrays { @override bool operator ==(Object other) => identical(this, other) || other is EnumArrays && + runtimeType == other.runtimeType && other.justSymbol == justSymbol && other.arrayEnum == arrayEnum; diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/enum_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/enum_test.dart index 1563c30bece7..5633122d7196 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/enum_test.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/enum_test.dart @@ -21,23 +21,15 @@ part 'enum_test.g.dart'; explicitToJson: true, ) class EnumTest { - /// Returns a new [EnumTest] instance. +/// Returns a new [EnumTest] instance. EnumTest({ - this.enumString, - required this.enumStringRequired, - this.enumInteger, - this.enumNumber, - this.outerEnum, - this.outerEnumInteger, - this.outerEnumDefaultValue, - this.outerEnumIntegerDefaultValue, }); @@ -149,6 +141,7 @@ class EnumTest { @override bool operator ==(Object other) => identical(this, other) || other is EnumTest && + runtimeType == other.runtimeType && other.enumString == enumString && other.enumStringRequired == enumStringRequired && other.enumInteger == enumInteger && diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/fake_big_decimal_map200_response.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/fake_big_decimal_map200_response.dart index e15b863e9218..1964074ebfbc 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/fake_big_decimal_map200_response.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/fake_big_decimal_map200_response.dart @@ -17,11 +17,9 @@ part 'fake_big_decimal_map200_response.g.dart'; explicitToJson: true, ) class FakeBigDecimalMap200Response { - /// Returns a new [FakeBigDecimalMap200Response] instance. +/// Returns a new [FakeBigDecimalMap200Response] instance. FakeBigDecimalMap200Response({ - this.someId, - this.someMap, }); @@ -53,6 +51,7 @@ class FakeBigDecimalMap200Response { @override bool operator ==(Object other) => identical(this, other) || other is FakeBigDecimalMap200Response && + runtimeType == other.runtimeType && other.someId == someId && other.someMap == someMap; diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/file_schema_test_class.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/file_schema_test_class.dart index 43307b721b15..b701d3d4418b 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/file_schema_test_class.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/file_schema_test_class.dart @@ -18,11 +18,9 @@ part 'file_schema_test_class.g.dart'; explicitToJson: true, ) class FileSchemaTestClass { - /// Returns a new [FileSchemaTestClass] instance. +/// Returns a new [FileSchemaTestClass] instance. FileSchemaTestClass({ - this.file, - this.files, }); @@ -54,6 +52,7 @@ class FileSchemaTestClass { @override bool operator ==(Object other) => identical(this, other) || other is FileSchemaTestClass && + runtimeType == other.runtimeType && other.file == file && other.files == files; diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/foo.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/foo.dart index 0f214c4e6ff8..1948a67c078d 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/foo.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/foo.dart @@ -17,9 +17,8 @@ part 'foo.g.dart'; explicitToJson: true, ) class Foo { - /// Returns a new [Foo] instance. +/// Returns a new [Foo] instance. Foo({ - this.bar = 'bar', }); @@ -39,6 +38,7 @@ class Foo { @override bool operator ==(Object other) => identical(this, other) || other is Foo && + runtimeType == other.runtimeType && other.bar == bar; @override diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/foo_get_default_response.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/foo_get_default_response.dart index 6a072cd6634b..7c30090dd707 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/foo_get_default_response.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/foo_get_default_response.dart @@ -18,9 +18,8 @@ part 'foo_get_default_response.g.dart'; explicitToJson: true, ) class FooGetDefaultResponse { - /// Returns a new [FooGetDefaultResponse] instance. +/// Returns a new [FooGetDefaultResponse] instance. FooGetDefaultResponse({ - this.string, }); @@ -40,6 +39,7 @@ class FooGetDefaultResponse { @override bool operator ==(Object other) => identical(this, other) || other is FooGetDefaultResponse && + runtimeType == other.runtimeType && other.string == string; @override diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/format_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/format_test.dart index 1f8c47a279f7..605e6963f41d 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/format_test.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/format_test.dart @@ -18,39 +18,23 @@ part 'format_test.g.dart'; explicitToJson: true, ) class FormatTest { - /// Returns a new [FormatTest] instance. +/// Returns a new [FormatTest] instance. FormatTest({ - this.integer, - this.int32, - this.int64, - required this.number, - this.float, - this.double_, - this.decimal, - this.string, - required this.byte, - this.binary, - required this.date, - this.dateTime, - this.uuid, - required this.password, - this.patternWithDigits, - this.patternWithDigitsAndDelimiter, }); @@ -257,6 +241,7 @@ class FormatTest { @override bool operator ==(Object other) => identical(this, other) || other is FormatTest && + runtimeType == other.runtimeType && other.integer == integer && other.int32 == int32 && other.int64 == int64 && diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/has_only_read_only.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/has_only_read_only.dart index d224cbcf15dd..dc319df07740 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/has_only_read_only.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/has_only_read_only.dart @@ -17,11 +17,9 @@ part 'has_only_read_only.g.dart'; explicitToJson: true, ) class HasOnlyReadOnly { - /// Returns a new [HasOnlyReadOnly] instance. +/// Returns a new [HasOnlyReadOnly] instance. HasOnlyReadOnly({ - this.bar, - this.foo, }); @@ -53,6 +51,7 @@ class HasOnlyReadOnly { @override bool operator ==(Object other) => identical(this, other) || other is HasOnlyReadOnly && + runtimeType == other.runtimeType && other.bar == bar && other.foo == foo; diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/health_check_result.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/health_check_result.dart index 38dcfcacddca..7f5230aaa6d9 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/health_check_result.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/health_check_result.dart @@ -17,9 +17,8 @@ part 'health_check_result.g.dart'; explicitToJson: true, ) class HealthCheckResult { - /// Returns a new [HealthCheckResult] instance. +/// Returns a new [HealthCheckResult] instance. HealthCheckResult({ - this.nullableMessage, }); @@ -39,6 +38,7 @@ class HealthCheckResult { @override bool operator ==(Object other) => identical(this, other) || other is HealthCheckResult && + runtimeType == other.runtimeType && other.nullableMessage == nullableMessage; @override diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/map_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/map_test.dart index 4a84fa85524f..1d8e8767f227 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/map_test.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/map_test.dart @@ -17,15 +17,11 @@ part 'map_test.g.dart'; explicitToJson: true, ) class MapTest { - /// Returns a new [MapTest] instance. +/// Returns a new [MapTest] instance. MapTest({ - this.mapMapOfString, - this.mapOfEnumString, - this.directMap, - this.indirectMap, }); @@ -82,6 +78,7 @@ class MapTest { @override bool operator ==(Object other) => identical(this, other) || other is MapTest && + runtimeType == other.runtimeType && other.mapMapOfString == mapMapOfString && other.mapOfEnumString == mapOfEnumString && other.directMap == directMap && diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/mixed_properties_and_additional_properties_class.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/mixed_properties_and_additional_properties_class.dart index 63bc9d15ceda..40bb81c2167b 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/mixed_properties_and_additional_properties_class.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/mixed_properties_and_additional_properties_class.dart @@ -18,13 +18,10 @@ part 'mixed_properties_and_additional_properties_class.g.dart'; explicitToJson: true, ) class MixedPropertiesAndAdditionalPropertiesClass { - /// Returns a new [MixedPropertiesAndAdditionalPropertiesClass] instance. +/// Returns a new [MixedPropertiesAndAdditionalPropertiesClass] instance. MixedPropertiesAndAdditionalPropertiesClass({ - this.uuid, - this.dateTime, - this.map, }); @@ -68,6 +65,7 @@ class MixedPropertiesAndAdditionalPropertiesClass { @override bool operator ==(Object other) => identical(this, other) || other is MixedPropertiesAndAdditionalPropertiesClass && + runtimeType == other.runtimeType && other.uuid == uuid && other.dateTime == dateTime && other.map == map; diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/model200_response.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/model200_response.dart index bee419bd3ee9..fb665d7c1b8a 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/model200_response.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/model200_response.dart @@ -17,11 +17,9 @@ part 'model200_response.g.dart'; explicitToJson: true, ) class Model200Response { - /// Returns a new [Model200Response] instance. +/// Returns a new [Model200Response] instance. Model200Response({ - this.name, - this.class_, }); @@ -53,6 +51,7 @@ class Model200Response { @override bool operator ==(Object other) => identical(this, other) || other is Model200Response && + runtimeType == other.runtimeType && other.name == name && other.class_ == class_; diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/model_client.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/model_client.dart index d6fef8505390..9c27e1a82d76 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/model_client.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/model_client.dart @@ -17,9 +17,8 @@ part 'model_client.g.dart'; explicitToJson: true, ) class ModelClient { - /// Returns a new [ModelClient] instance. +/// Returns a new [ModelClient] instance. ModelClient({ - this.client, }); @@ -39,6 +38,7 @@ class ModelClient { @override bool operator ==(Object other) => identical(this, other) || other is ModelClient && + runtimeType == other.runtimeType && other.client == client; @override diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/model_file.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/model_file.dart index c34131e2940f..14ddd1ecd46f 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/model_file.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/model_file.dart @@ -17,9 +17,8 @@ part 'model_file.g.dart'; explicitToJson: true, ) class ModelFile { - /// Returns a new [ModelFile] instance. +/// Returns a new [ModelFile] instance. ModelFile({ - this.sourceURI, }); @@ -40,6 +39,7 @@ class ModelFile { @override bool operator ==(Object other) => identical(this, other) || other is ModelFile && + runtimeType == other.runtimeType && other.sourceURI == sourceURI; @override diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/model_list.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/model_list.dart index c99439660de6..5ed275184b68 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/model_list.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/model_list.dart @@ -17,9 +17,8 @@ part 'model_list.g.dart'; explicitToJson: true, ) class ModelList { - /// Returns a new [ModelList] instance. +/// Returns a new [ModelList] instance. ModelList({ - this.n123list, }); @@ -39,6 +38,7 @@ class ModelList { @override bool operator ==(Object other) => identical(this, other) || other is ModelList && + runtimeType == other.runtimeType && other.n123list == n123list; @override diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/model_return.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/model_return.dart index c29886c95b7e..4b2e9407cdf6 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/model_return.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/model_return.dart @@ -17,9 +17,8 @@ part 'model_return.g.dart'; explicitToJson: true, ) class ModelReturn { - /// Returns a new [ModelReturn] instance. +/// Returns a new [ModelReturn] instance. ModelReturn({ - this.return_, }); @@ -39,6 +38,7 @@ class ModelReturn { @override bool operator ==(Object other) => identical(this, other) || other is ModelReturn && + runtimeType == other.runtimeType && other.return_ == return_; @override diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/name.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/name.dart index 787a603a97fe..180f61890a4b 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/name.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/name.dart @@ -17,15 +17,11 @@ part 'name.g.dart'; explicitToJson: true, ) class Name { - /// Returns a new [Name] instance. +/// Returns a new [Name] instance. Name({ - required this.name, - this.snakeCase, - this.property, - this.n123number, }); @@ -81,6 +77,7 @@ class Name { @override bool operator ==(Object other) => identical(this, other) || other is Name && + runtimeType == other.runtimeType && other.name == name && other.snakeCase == snakeCase && other.property == property && diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/nullable_class.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/nullable_class.dart index 0ffb6db0f33f..871c69cff78e 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/nullable_class.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/nullable_class.dart @@ -16,32 +16,20 @@ part 'nullable_class.g.dart'; disallowUnrecognizedKeys: false, explicitToJson: true, ) -class NullableClass { - /// Returns a new [NullableClass] instance. +class NullableClass extends Object { +/// Returns a new [NullableClass] instance. NullableClass({ - this.integerProp, - this.numberProp, - this.booleanProp, - this.stringProp, - this.dateProp, - this.datetimeProp, - this.arrayNullableProp, - this.arrayAndItemsNullableProp, - this.arrayItemsNullable, - this.objectNullableProp, - this.objectAndItemsNullableProp, - this.objectItemsNullable, }); @@ -193,6 +181,7 @@ class NullableClass { @override bool operator ==(Object other) => identical(this, other) || other is NullableClass && + runtimeType == other.runtimeType && other.integerProp == integerProp && other.numberProp == numberProp && other.booleanProp == booleanProp && diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/number_only.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/number_only.dart index 2e8ff4201b8a..4bc7e04ea9f8 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/number_only.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/number_only.dart @@ -17,9 +17,8 @@ part 'number_only.g.dart'; explicitToJson: true, ) class NumberOnly { - /// Returns a new [NumberOnly] instance. +/// Returns a new [NumberOnly] instance. NumberOnly({ - this.justNumber, }); @@ -39,6 +38,7 @@ class NumberOnly { @override bool operator ==(Object other) => identical(this, other) || other is NumberOnly && + runtimeType == other.runtimeType && other.justNumber == justNumber; @override diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/object_that_references_objects_with_duplicate_inline_enums.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/object_that_references_objects_with_duplicate_inline_enums.dart index f75412a52d6c..411d91cb3a4a 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/object_that_references_objects_with_duplicate_inline_enums.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/object_that_references_objects_with_duplicate_inline_enums.dart @@ -19,11 +19,9 @@ part 'object_that_references_objects_with_duplicate_inline_enums.g.dart'; explicitToJson: true, ) class ObjectThatReferencesObjectsWithDuplicateInlineEnums { - /// Returns a new [ObjectThatReferencesObjectsWithDuplicateInlineEnums] instance. +/// Returns a new [ObjectThatReferencesObjectsWithDuplicateInlineEnums] instance. ObjectThatReferencesObjectsWithDuplicateInlineEnums({ - this.objectOne, - this.objectTwo, }); @@ -55,6 +53,7 @@ class ObjectThatReferencesObjectsWithDuplicateInlineEnums { @override bool operator ==(Object other) => identical(this, other) || other is ObjectThatReferencesObjectsWithDuplicateInlineEnums && + runtimeType == other.runtimeType && other.objectOne == objectOne && other.objectTwo == objectTwo; diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/object_with_deprecated_fields.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/object_with_deprecated_fields.dart index e2a95d308514..1ea6d30e1929 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/object_with_deprecated_fields.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/object_with_deprecated_fields.dart @@ -18,15 +18,11 @@ part 'object_with_deprecated_fields.g.dart'; explicitToJson: true, ) class ObjectWithDeprecatedFields { - /// Returns a new [ObjectWithDeprecatedFields] instance. +/// Returns a new [ObjectWithDeprecatedFields] instance. ObjectWithDeprecatedFields({ - this.uuid, - this.id, - this.deprecatedRef, - this.bars, }); @@ -85,6 +81,7 @@ class ObjectWithDeprecatedFields { @override bool operator ==(Object other) => identical(this, other) || other is ObjectWithDeprecatedFields && + runtimeType == other.runtimeType && other.uuid == uuid && other.id == id && other.deprecatedRef == deprecatedRef && diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/object_with_duplicate_inline_enum.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/object_with_duplicate_inline_enum.dart index 4734312e79e2..a8d05af84fbe 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/object_with_duplicate_inline_enum.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/object_with_duplicate_inline_enum.dart @@ -17,9 +17,8 @@ part 'object_with_duplicate_inline_enum.g.dart'; explicitToJson: true, ) class ObjectWithDuplicateInlineEnum { - /// Returns a new [ObjectWithDuplicateInlineEnum] instance. +/// Returns a new [ObjectWithDuplicateInlineEnum] instance. ObjectWithDuplicateInlineEnum({ - this.attribute, }); @@ -41,6 +40,7 @@ class ObjectWithDuplicateInlineEnum { @override bool operator ==(Object other) => identical(this, other) || other is ObjectWithDuplicateInlineEnum && + runtimeType == other.runtimeType && other.attribute == attribute; @override diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/object_with_enum.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/object_with_enum.dart index 7cbf5091e596..87b71c80dad4 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/object_with_enum.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/object_with_enum.dart @@ -18,9 +18,8 @@ part 'object_with_enum.g.dart'; explicitToJson: true, ) class ObjectWithEnum { - /// Returns a new [ObjectWithEnum] instance. +/// Returns a new [ObjectWithEnum] instance. ObjectWithEnum({ - this.attribute = TestEnum.empty, }); @@ -41,6 +40,7 @@ class ObjectWithEnum { @override bool operator ==(Object other) => identical(this, other) || other is ObjectWithEnum && + runtimeType == other.runtimeType && other.attribute == attribute; @override diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/object_with_inline_enum.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/object_with_inline_enum.dart index 48e01ea5d998..34810583dd69 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/object_with_inline_enum.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/object_with_inline_enum.dart @@ -17,9 +17,8 @@ part 'object_with_inline_enum.g.dart'; explicitToJson: true, ) class ObjectWithInlineEnum { - /// Returns a new [ObjectWithInlineEnum] instance. +/// Returns a new [ObjectWithInlineEnum] instance. ObjectWithInlineEnum({ - this.attribute, }); @@ -41,6 +40,7 @@ class ObjectWithInlineEnum { @override bool operator ==(Object other) => identical(this, other) || other is ObjectWithInlineEnum && + runtimeType == other.runtimeType && other.attribute == attribute; @override diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/object_with_inline_enum_default_value.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/object_with_inline_enum_default_value.dart index 289025e07a44..d8bc76671fad 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/object_with_inline_enum_default_value.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/object_with_inline_enum_default_value.dart @@ -17,9 +17,8 @@ part 'object_with_inline_enum_default_value.g.dart'; explicitToJson: true, ) class ObjectWithInlineEnumDefaultValue { - /// Returns a new [ObjectWithInlineEnumDefaultValue] instance. +/// Returns a new [ObjectWithInlineEnumDefaultValue] instance. ObjectWithInlineEnumDefaultValue({ - this.attribute = const ObjectWithInlineEnumDefaultValueAttributeEnum._('value_one'), }); @@ -41,6 +40,7 @@ class ObjectWithInlineEnumDefaultValue { @override bool operator ==(Object other) => identical(this, other) || other is ObjectWithInlineEnumDefaultValue && + runtimeType == other.runtimeType && other.attribute == attribute; @override diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/order.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/order.dart index e50a3e70e819..0b6f6b0db3de 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/order.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/order.dart @@ -17,19 +17,13 @@ part 'order.g.dart'; explicitToJson: true, ) class Order { - /// Returns a new [Order] instance. +/// Returns a new [Order] instance. Order({ - this.id, - this.petId, - this.quantity, - this.shipDate, - this.status, - this.complete = false, }); @@ -111,6 +105,7 @@ class Order { @override bool operator ==(Object other) => identical(this, other) || other is Order && + runtimeType == other.runtimeType && other.id == id && other.petId == petId && other.quantity == quantity && diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/outer_composite.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/outer_composite.dart index 66a78af39ebc..2c597e8d448a 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/outer_composite.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/outer_composite.dart @@ -17,13 +17,10 @@ part 'outer_composite.g.dart'; explicitToJson: true, ) class OuterComposite { - /// Returns a new [OuterComposite] instance. +/// Returns a new [OuterComposite] instance. OuterComposite({ - this.myNumber, - this.myString, - this.myBoolean, }); @@ -67,6 +64,7 @@ class OuterComposite { @override bool operator ==(Object other) => identical(this, other) || other is OuterComposite && + runtimeType == other.runtimeType && other.myNumber == myNumber && other.myString == myString && other.myBoolean == myBoolean; diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/outer_object_with_enum_property.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/outer_object_with_enum_property.dart index 2708a3d953fd..f7b1ce7279c7 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/outer_object_with_enum_property.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/outer_object_with_enum_property.dart @@ -18,9 +18,8 @@ part 'outer_object_with_enum_property.g.dart'; explicitToJson: true, ) class OuterObjectWithEnumProperty { - /// Returns a new [OuterObjectWithEnumProperty] instance. +/// Returns a new [OuterObjectWithEnumProperty] instance. OuterObjectWithEnumProperty({ - required this.value, }); @@ -41,6 +40,7 @@ class OuterObjectWithEnumProperty { @override bool operator ==(Object other) => identical(this, other) || other is OuterObjectWithEnumProperty && + runtimeType == other.runtimeType && other.value == value; @override diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/parent_with_nullable.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/parent_with_nullable.dart index 121cf835d54d..8a9ebf3925ee 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/parent_with_nullable.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/parent_with_nullable.dart @@ -17,11 +17,9 @@ part 'parent_with_nullable.g.dart'; explicitToJson: true, ) class ParentWithNullable { - /// Returns a new [ParentWithNullable] instance. +/// Returns a new [ParentWithNullable] instance. ParentWithNullable({ - this.type, - this.nullableProperty, }); @@ -53,6 +51,7 @@ class ParentWithNullable { @override bool operator ==(Object other) => identical(this, other) || other is ParentWithNullable && + runtimeType == other.runtimeType && other.type == type && other.nullableProperty == nullableProperty; diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/pet.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/pet.dart index b2674ae99fc6..5d8e258f7f32 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/pet.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/pet.dart @@ -19,19 +19,13 @@ part 'pet.g.dart'; explicitToJson: true, ) class Pet { - /// Returns a new [Pet] instance. +/// Returns a new [Pet] instance. Pet({ - this.id, - this.category, - required this.name, - required this.photoUrls, - this.tags, - this.status, }); @@ -113,6 +107,7 @@ class Pet { @override bool operator ==(Object other) => identical(this, other) || other is Pet && + runtimeType == other.runtimeType && other.id == id && other.category == category && other.name == name && diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/read_only_first.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/read_only_first.dart index d276ea105f41..2e159fb0384c 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/read_only_first.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/read_only_first.dart @@ -17,11 +17,9 @@ part 'read_only_first.g.dart'; explicitToJson: true, ) class ReadOnlyFirst { - /// Returns a new [ReadOnlyFirst] instance. +/// Returns a new [ReadOnlyFirst] instance. ReadOnlyFirst({ - this.bar, - this.baz, }); @@ -53,6 +51,7 @@ class ReadOnlyFirst { @override bool operator ==(Object other) => identical(this, other) || other is ReadOnlyFirst && + runtimeType == other.runtimeType && other.bar == bar && other.baz == baz; diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/special_model_name.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/special_model_name.dart index 37053ba18f7e..52a1e6c2ab0b 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/special_model_name.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/special_model_name.dart @@ -17,9 +17,8 @@ part 'special_model_name.g.dart'; explicitToJson: true, ) class SpecialModelName { - /// Returns a new [SpecialModelName] instance. +/// Returns a new [SpecialModelName] instance. SpecialModelName({ - this.dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket, }); @@ -39,6 +38,7 @@ class SpecialModelName { @override bool operator ==(Object other) => identical(this, other) || other is SpecialModelName && + runtimeType == other.runtimeType && other.dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket == dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket; @override diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/tag.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/tag.dart index ca1d4ed43ebc..ed588ecc4a0a 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/tag.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/tag.dart @@ -17,11 +17,9 @@ part 'tag.g.dart'; explicitToJson: true, ) class Tag { - /// Returns a new [Tag] instance. +/// Returns a new [Tag] instance. Tag({ - this.id, - this.name, }); @@ -53,6 +51,7 @@ class Tag { @override bool operator ==(Object other) => identical(this, other) || other is Tag && + runtimeType == other.runtimeType && other.id == id && other.name == name; diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/test_inline_freeform_additional_properties_request.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/test_inline_freeform_additional_properties_request.dart index 2eb68120e147..ffb85a706573 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/test_inline_freeform_additional_properties_request.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/test_inline_freeform_additional_properties_request.dart @@ -16,10 +16,9 @@ part 'test_inline_freeform_additional_properties_request.g.dart'; disallowUnrecognizedKeys: false, explicitToJson: true, ) -class TestInlineFreeformAdditionalPropertiesRequest { - /// Returns a new [TestInlineFreeformAdditionalPropertiesRequest] instance. +class TestInlineFreeformAdditionalPropertiesRequest extends Object { +/// Returns a new [TestInlineFreeformAdditionalPropertiesRequest] instance. TestInlineFreeformAdditionalPropertiesRequest({ - this.someProperty, }); @@ -39,6 +38,7 @@ class TestInlineFreeformAdditionalPropertiesRequest { @override bool operator ==(Object other) => identical(this, other) || other is TestInlineFreeformAdditionalPropertiesRequest && + runtimeType == other.runtimeType && other.someProperty == someProperty; @override diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/user.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/user.dart index 15e9b2a2eb61..6f7263dad157 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/user.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/user.dart @@ -17,23 +17,15 @@ part 'user.g.dart'; explicitToJson: true, ) class User { - /// Returns a new [User] instance. +/// Returns a new [User] instance. User({ - this.id, - this.username, - this.firstName, - this.lastName, - this.email, - this.password, - this.phone, - this.userStatus, }); @@ -138,6 +130,7 @@ class User { @override bool operator ==(Object other) => identical(this, other) || other is User && + runtimeType == other.runtimeType && other.id == id && other.username == username && other.firstName == firstName &&