mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-06-30 12:40:52 +00:00
[dart-dio] Incorrect hashCode and == overide for fields withList (#18198)
* [dart-dio] Incorrect hashCode and == overide for fields withList * fix * extend description --------- Co-authored-by: Vasiliy Ditsyak <vasilich6107@users.noreply.github.com>
This commit is contained in:
parent
8924083d73
commit
3d15864eac
@ -23,6 +23,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.</dd></dl>|true|
|
||||
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|
||||
|enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|<dl><dt>**false**</dt><dd>No changes to the enum's are made, this is the default option.</dd><dt>**true**</dt><dd>With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.</dd></dl>|false|
|
||||
|equalityCheckMethod|Specify equality check method. Takes effect only in case if serializationLibrary is json_serializable.|<dl><dt>**default**</dt><dd>[DEFAULT] Built in hash code generation method</dd><dt>**equatable**</dt><dd>Uses equatable library for equality checking</dd></dl>|default|
|
||||
|finalProperties|Whether properties are marked as final when using Json Serializable for serialization| |true|
|
||||
|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.</dd></dl>|true|
|
||||
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|
||||
|
@ -60,6 +60,9 @@ public class DartDioClientCodegen extends AbstractDartCodegen {
|
||||
public static final String DATE_LIBRARY_TIME_MACHINE = "timemachine";
|
||||
public static final String DATE_LIBRARY_DEFAULT = DATE_LIBRARY_CORE;
|
||||
|
||||
public static final String EQUALITY_CHECK_METHOD = "equalityCheckMethod";
|
||||
public static final String EQUALITY_CHECK_METHOD_DEFAULT = "default";
|
||||
public static final String EQUALITY_CHECK_METHOD_EQUATABLE = "equatable";
|
||||
public static final String SERIALIZATION_LIBRARY_BUILT_VALUE = "built_value";
|
||||
public static final String SERIALIZATION_LIBRARY_JSON_SERIALIZABLE = "json_serializable";
|
||||
public static final String SERIALIZATION_LIBRARY_DEFAULT = SERIALIZATION_LIBRARY_BUILT_VALUE;
|
||||
@ -71,6 +74,7 @@ public class DartDioClientCodegen extends AbstractDartCodegen {
|
||||
private static final String CLIENT_NAME = "clientName";
|
||||
|
||||
private String dateLibrary;
|
||||
private String equalityCheckMethod;
|
||||
|
||||
private String clientName;
|
||||
|
||||
@ -107,19 +111,30 @@ public class DartDioClientCodegen extends AbstractDartCodegen {
|
||||
serializationLibrary.setDefault(SERIALIZATION_LIBRARY_DEFAULT);
|
||||
cliOptions.add(serializationLibrary);
|
||||
|
||||
// Equality check option
|
||||
final CliOption equalityCheckOption = CliOption.newString(EQUALITY_CHECK_METHOD, "Specify equality check method. Takes effect only in case if serializationLibrary is json_serializable.");
|
||||
equalityCheckOption.setDefault(EQUALITY_CHECK_METHOD_DEFAULT);
|
||||
|
||||
final Map<String, String> equalityCheckOptions = new HashMap<>();
|
||||
equalityCheckOptions.put(EQUALITY_CHECK_METHOD_DEFAULT, "[DEFAULT] Built in hash code generation method");
|
||||
equalityCheckOptions.put(EQUALITY_CHECK_METHOD_EQUATABLE, "Uses equatable library for equality checking");
|
||||
equalityCheckOption.setEnum(equalityCheckOptions);
|
||||
cliOptions.add(equalityCheckOption);
|
||||
|
||||
// Date Library Option
|
||||
final CliOption dateOption = CliOption.newString(DATE_LIBRARY, "Specify Date library");
|
||||
dateOption.setDefault(DATE_LIBRARY_DEFAULT);
|
||||
|
||||
final CliOption finalProperties = CliOption.newBoolean(FINAL_PROPERTIES, "Whether properties are marked as final when using Json Serializable for serialization");
|
||||
finalProperties.setDefault("true");
|
||||
cliOptions.add(finalProperties);
|
||||
|
||||
final Map<String, String> dateOptions = new HashMap<>();
|
||||
dateOptions.put(DATE_LIBRARY_CORE, "[DEFAULT] Dart core library (DateTime)");
|
||||
dateOptions.put(DATE_LIBRARY_TIME_MACHINE, "Time Machine is date and time library for Flutter, Web, and Server with support for timezones, calendars, cultures, formatting and parsing.");
|
||||
dateOption.setEnum(dateOptions);
|
||||
cliOptions.add(dateOption);
|
||||
|
||||
// Final Properties Option
|
||||
final CliOption finalProperties = CliOption.newBoolean(FINAL_PROPERTIES, "Whether properties are marked as final when using Json Serializable for serialization");
|
||||
finalProperties.setDefault("true");
|
||||
cliOptions.add(finalProperties);
|
||||
}
|
||||
|
||||
public String getDateLibrary() {
|
||||
@ -130,6 +145,14 @@ public class DartDioClientCodegen extends AbstractDartCodegen {
|
||||
this.dateLibrary = library;
|
||||
}
|
||||
|
||||
public String getEqualityCheckMethod() {
|
||||
return equalityCheckMethod;
|
||||
}
|
||||
|
||||
public void setEqualityCheckMethod(String equalityCheckMethod) {
|
||||
this.equalityCheckMethod = equalityCheckMethod;
|
||||
}
|
||||
|
||||
public String getClientName() {
|
||||
return clientName;
|
||||
}
|
||||
@ -172,6 +195,12 @@ public class DartDioClientCodegen extends AbstractDartCodegen {
|
||||
}
|
||||
setDateLibrary(additionalProperties.get(DATE_LIBRARY).toString());
|
||||
|
||||
if (!additionalProperties.containsKey(EQUALITY_CHECK_METHOD)) {
|
||||
additionalProperties.put(EQUALITY_CHECK_METHOD, EQUALITY_CHECK_METHOD_DEFAULT);
|
||||
LOGGER.debug("Equality check method not set, using default {}", EQUALITY_CHECK_METHOD_DEFAULT);
|
||||
}
|
||||
setEqualityCheckMethod(additionalProperties.get(EQUALITY_CHECK_METHOD).toString());
|
||||
|
||||
if (!additionalProperties.containsKey(FINAL_PROPERTIES)) {
|
||||
additionalProperties.put(FINAL_PROPERTIES, Boolean.parseBoolean(FINAL_PROPERTIES_DEFAULT_VALUE));
|
||||
LOGGER.debug("finalProperties not set, using default {}", FINAL_PROPERTIES_DEFAULT_VALUE);
|
||||
@ -205,6 +234,7 @@ public class DartDioClientCodegen extends AbstractDartCodegen {
|
||||
supportingFiles.add(new SupportingFile("auth/auth.mustache", authFolder, "auth.dart"));
|
||||
|
||||
configureSerializationLibrary(srcFolder);
|
||||
configureEqualityCheckMethod(srcFolder);
|
||||
configureDateLibrary(srcFolder);
|
||||
}
|
||||
|
||||
@ -278,6 +308,17 @@ public class DartDioClientCodegen extends AbstractDartCodegen {
|
||||
imports.put("MultipartFile", DIO_IMPORT);
|
||||
}
|
||||
|
||||
private void configureEqualityCheckMethod(String srcFolder) {
|
||||
switch (equalityCheckMethod) {
|
||||
case EQUALITY_CHECK_METHOD_EQUATABLE:
|
||||
additionalProperties.put("useEquatable", "true");
|
||||
break;
|
||||
default:
|
||||
case EQUALITY_CHECK_METHOD_DEFAULT:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void configureDateLibrary(String srcFolder) {
|
||||
switch (dateLibrary) {
|
||||
case DATE_LIBRARY_TIME_MACHINE:
|
||||
|
@ -20,6 +20,9 @@ dependencies:
|
||||
built_value: '>=8.4.0 <9.0.0'
|
||||
built_collection: '>=5.1.1 <6.0.0'
|
||||
{{/useBuiltValue}}
|
||||
{{#useEquatable}}
|
||||
equatable: '^2.0.5'
|
||||
{{/useEquatable}}
|
||||
{{#useJsonSerializable}}
|
||||
json_annotation: '^4.4.0'
|
||||
{{/useJsonSerializable}}
|
||||
|
@ -1,4 +1,7 @@
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
{{#useEquatable}}
|
||||
import 'package:equatable/src/equatable_utils.dart';
|
||||
{{/useEquatable}}
|
||||
|
||||
part '{{classFilename}}.g.dart';
|
||||
|
||||
@ -61,17 +64,50 @@ class {{{classname}}} {
|
||||
|
||||
|
||||
{{/vars}}
|
||||
|
||||
{{#useEquatable}}
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
other is {{{classname}}} &&
|
||||
runtimeType == other.runtimeType &&
|
||||
equals(
|
||||
[
|
||||
{{#vars}}
|
||||
{{{name}}},
|
||||
{{/vars}}
|
||||
],
|
||||
[
|
||||
{{#vars}}
|
||||
other.{{{name}}},
|
||||
{{/vars}}
|
||||
]
|
||||
);
|
||||
}
|
||||
{{/useEquatable}}
|
||||
|
||||
{{^useEquatable}}
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is {{{classname}}} &&
|
||||
{{#vars}}
|
||||
other.{{{name}}} == {{{name}}}{{^-last}} &&{{/-last}}{{#-last}};{{/-last}}
|
||||
{{/vars}}
|
||||
{{/useEquatable}}
|
||||
|
||||
{{#useEquatable}}
|
||||
@override
|
||||
int get hashCode => runtimeType.hashCode ^ mapPropsToHashCode([
|
||||
{{#vars}}
|
||||
{{{name}}},
|
||||
{{/vars}}
|
||||
],);
|
||||
{{/useEquatable}}
|
||||
{{^useEquatable}}
|
||||
@override
|
||||
int get hashCode =>
|
||||
{{#vars}}
|
||||
{{#isNullable}}({{{name}}} == null ? 0 : {{{name}}}.hashCode){{/isNullable}}{{^isNullable}}{{{name}}}.hashCode{{/isNullable}}{{^-last}} +{{/-last}}{{#-last}};{{/-last}}
|
||||
{{/vars}}
|
||||
{{/useEquatable}}
|
||||
|
||||
factory {{{classname}}}.fromJson(Map<String, dynamic> json) => _${{{classname}}}FromJson(json);
|
||||
|
||||
|
@ -7,11 +7,13 @@ import 'package:json_annotation/json_annotation.dart';
|
||||
enum {{{classname}}} {
|
||||
{{#allowableValues}}
|
||||
{{#enumVars}}
|
||||
{{^isNull}}
|
||||
{{#description}}
|
||||
/// {{{.}}}
|
||||
{{/description}}
|
||||
@JsonValue({{#isString}}r{{/isString}}{{{value}}})
|
||||
{{{name}}}({{^isString}}'{{/isString}}{{#isString}}r{{/isString}}{{{value}}}{{^isString}}'{{/isString}}){{^-last}},{{/-last}}{{#-last}};{{/-last}}
|
||||
{{/isNull}}
|
||||
{{/enumVars}}
|
||||
{{/allowableValues}}
|
||||
|
||||
|
@ -20,6 +20,7 @@ package org.openapitools.codegen.dart;
|
||||
import org.openapitools.codegen.AbstractOptionsTest;
|
||||
import org.openapitools.codegen.CodegenConfig;
|
||||
import org.openapitools.codegen.languages.DartClientCodegen;
|
||||
import org.openapitools.codegen.languages.DartDioClientCodegen;
|
||||
import org.openapitools.codegen.options.DartClientOptionsProvider;
|
||||
|
||||
import static org.mockito.Mockito.mock;
|
||||
|
@ -53,6 +53,7 @@ public class DartDioClientOptionsTest extends AbstractOptionsTest {
|
||||
verify(clientCodegen).setUseEnumExtension(Boolean.parseBoolean(DartDioClientOptionsProvider.USE_ENUM_EXTENSION));
|
||||
verify(clientCodegen).setDateLibrary(DartDioClientCodegen.DATE_LIBRARY_DEFAULT);
|
||||
verify(clientCodegen).setLibrary(DartDioClientCodegen.SERIALIZATION_LIBRARY_DEFAULT);
|
||||
verify(clientCodegen).setEqualityCheckMethod(DartDioClientCodegen.EQUALITY_CHECK_METHOD_DEFAULT);
|
||||
verify(clientCodegen).setEnumUnknownDefaultCase(Boolean.parseBoolean(DartDioClientOptionsProvider.ENUM_UNKNOWN_DEFAULT_CASE_VALUE));
|
||||
}
|
||||
}
|
||||
|
@ -64,6 +64,7 @@ public class DartDioClientOptionsProvider implements OptionsProvider {
|
||||
.put(CodegenConstants.SERIALIZATION_LIBRARY, DartDioClientCodegen.SERIALIZATION_LIBRARY_DEFAULT)
|
||||
.put(DartDioClientCodegen.DATE_LIBRARY, DartDioClientCodegen.DATE_LIBRARY_DEFAULT)
|
||||
.put(DartDioClientCodegen.FINAL_PROPERTIES, DartDioClientCodegen.FINAL_PROPERTIES_DEFAULT_VALUE)
|
||||
.put(DartDioClientCodegen.EQUALITY_CHECK_METHOD, DartDioClientCodegen.EQUALITY_CHECK_METHOD_DEFAULT)
|
||||
.put(CodegenConstants.SOURCE_FOLDER, SOURCE_FOLDER_VALUE)
|
||||
.put(DartDioClientCodegen.USE_ENUM_EXTENSION, USE_ENUM_EXTENSION)
|
||||
.put(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, ALLOW_UNICODE_IDENTIFIERS_VALUE)
|
||||
|
@ -47,6 +47,8 @@ class AdditionalPropertiesClass {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is AdditionalPropertiesClass &&
|
||||
other.mapProperty == mapProperty &&
|
||||
|
@ -48,6 +48,8 @@ class AllOfWithSingleRef {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is AllOfWithSingleRef &&
|
||||
other.username == username &&
|
||||
|
@ -47,6 +47,8 @@ class Animal {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is Animal &&
|
||||
other.className == className &&
|
||||
|
@ -61,6 +61,8 @@ class ApiResponse {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is ApiResponse &&
|
||||
other.code == code &&
|
||||
|
@ -33,6 +33,8 @@ class ArrayOfArrayOfNumberOnly {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is ArrayOfArrayOfNumberOnly &&
|
||||
other.arrayArrayNumber == arrayArrayNumber;
|
||||
|
@ -33,6 +33,8 @@ class ArrayOfNumberOnly {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is ArrayOfNumberOnly &&
|
||||
other.arrayNumber == arrayNumber;
|
||||
|
@ -62,6 +62,8 @@ class ArrayTest {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is ArrayTest &&
|
||||
other.arrayOfString == arrayOfString &&
|
||||
|
@ -104,6 +104,8 @@ class Capitalization {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is Capitalization &&
|
||||
other.smallCamel == smallCamel &&
|
||||
|
@ -64,6 +64,8 @@ class Cat {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is Cat &&
|
||||
other.className == className &&
|
||||
|
@ -47,6 +47,8 @@ class Category {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is Category &&
|
||||
other.id == id &&
|
||||
|
@ -64,6 +64,8 @@ class ChildWithNullable {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is ChildWithNullable &&
|
||||
other.type == type &&
|
||||
|
@ -33,6 +33,8 @@ class ClassModel {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is ClassModel &&
|
||||
other.class_ == class_;
|
||||
|
@ -34,6 +34,8 @@ class DeprecatedObject {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is DeprecatedObject &&
|
||||
other.name == name;
|
||||
|
@ -64,6 +64,8 @@ class Dog {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is Dog &&
|
||||
other.className == className &&
|
||||
|
@ -47,6 +47,8 @@ class EnumArrays {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is EnumArrays &&
|
||||
other.justSymbol == justSymbol &&
|
||||
|
@ -135,6 +135,8 @@ class EnumTest {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is EnumTest &&
|
||||
other.enumString == enumString &&
|
||||
|
@ -47,6 +47,8 @@ class FakeBigDecimalMap200Response {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is FakeBigDecimalMap200Response &&
|
||||
other.someId == someId &&
|
||||
|
@ -48,6 +48,8 @@ class FileSchemaTestClass {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is FileSchemaTestClass &&
|
||||
other.file == file &&
|
||||
|
@ -33,6 +33,8 @@ class Foo {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is Foo &&
|
||||
other.bar == bar;
|
||||
|
@ -34,6 +34,8 @@ class FooGetDefaultResponse {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is FooGetDefaultResponse &&
|
||||
other.string == string;
|
||||
|
@ -251,6 +251,8 @@ class FormatTest {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is FormatTest &&
|
||||
other.integer == integer &&
|
||||
|
@ -47,6 +47,8 @@ class HasOnlyReadOnly {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is HasOnlyReadOnly &&
|
||||
other.bar == bar &&
|
||||
|
@ -33,6 +33,8 @@ class HealthCheckResult {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is HealthCheckResult &&
|
||||
other.nullableMessage == nullableMessage;
|
||||
|
@ -75,6 +75,8 @@ class MapTest {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is MapTest &&
|
||||
other.mapMapOfString == mapMapOfString &&
|
||||
|
@ -62,6 +62,8 @@ class MixedPropertiesAndAdditionalPropertiesClass {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is MixedPropertiesAndAdditionalPropertiesClass &&
|
||||
other.uuid == uuid &&
|
||||
|
@ -47,6 +47,8 @@ class Model200Response {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is Model200Response &&
|
||||
other.name == name &&
|
||||
|
@ -33,6 +33,8 @@ class ModelClient {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is ModelClient &&
|
||||
other.client == client;
|
||||
|
@ -34,6 +34,8 @@ class ModelFile {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is ModelFile &&
|
||||
other.sourceURI == sourceURI;
|
||||
|
@ -33,6 +33,8 @@ class ModelList {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is ModelList &&
|
||||
other.n123list == n123list;
|
||||
|
@ -33,6 +33,8 @@ class ModelReturn {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is ModelReturn &&
|
||||
other.return_ == return_;
|
||||
|
@ -75,6 +75,8 @@ class Name {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is Name &&
|
||||
other.name == name &&
|
||||
|
@ -187,6 +187,8 @@ class NullableClass {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is NullableClass &&
|
||||
other.integerProp == integerProp &&
|
||||
|
@ -33,6 +33,8 @@ class NumberOnly {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is NumberOnly &&
|
||||
other.justNumber == justNumber;
|
||||
|
@ -79,6 +79,8 @@ class ObjectWithDeprecatedFields {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is ObjectWithDeprecatedFields &&
|
||||
other.uuid == uuid &&
|
||||
|
@ -104,6 +104,8 @@ class Order {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is Order &&
|
||||
other.id == id &&
|
||||
|
@ -61,6 +61,8 @@ class OuterComposite {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is OuterComposite &&
|
||||
other.myNumber == myNumber &&
|
||||
|
@ -34,6 +34,8 @@ class OuterObjectWithEnumProperty {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is OuterObjectWithEnumProperty &&
|
||||
other.value == value;
|
||||
|
@ -47,6 +47,8 @@ class ParentWithNullable {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is ParentWithNullable &&
|
||||
other.type == type &&
|
||||
|
@ -106,6 +106,8 @@ class Pet {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is Pet &&
|
||||
other.id == id &&
|
||||
|
@ -47,6 +47,8 @@ class ReadOnlyFirst {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is ReadOnlyFirst &&
|
||||
other.bar == bar &&
|
||||
|
@ -33,6 +33,8 @@ class SpecialModelName {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is SpecialModelName &&
|
||||
other.dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket == dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket;
|
||||
|
@ -47,6 +47,8 @@ class Tag {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is Tag &&
|
||||
other.id == id &&
|
||||
|
@ -33,6 +33,8 @@ class TestInlineFreeformAdditionalPropertiesRequest {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is TestInlineFreeformAdditionalPropertiesRequest &&
|
||||
other.someProperty == someProperty;
|
||||
|
@ -132,6 +132,8 @@ class User {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is User &&
|
||||
other.id == id &&
|
||||
|
Loading…
x
Reference in New Issue
Block a user