diff --git a/modules/openapi-generator/src/main/resources/dart2/apilib.mustache b/modules/openapi-generator/src/main/resources/dart2/apilib.mustache index 876eba03cc6e..1b1898d88dda 100644 --- a/modules/openapi-generator/src/main/resources/dart2/apilib.mustache +++ b/modules/openapi-generator/src/main/resources/dart2/apilib.mustache @@ -5,6 +5,7 @@ import 'dart:async'; import 'dart:convert'; import 'dart:io'; +import 'package:collection/collection.dart'; import 'package:http/http.dart'; import 'package:intl/intl.dart'; import 'package:meta/meta.dart'; @@ -23,13 +24,16 @@ part 'auth/http_bearer_auth.dart'; {{#models}}{{#model}}part 'model/{{{classFilename}}}.dart'; {{/model}}{{/models}} +/// An [ApiClient] instance that uses the default values obtained from +/// the OpenAPI specification file. +var defaultApiClient = ApiClient(); + const _delimiters = {'csv': ',', 'ssv': ' ', 'tsv': '\t', 'pipes': '|'}; const _dateEpochMarker = 'epoch'; +const _deepEquality = DeepCollectionEquality(); final _dateFormatter = DateFormat('yyyy-MM-dd'); final _regList = RegExp(r'^List<(.*)>$'); final _regSet = RegExp(r'^Set<(.*)>$'); final _regMap = RegExp(r'^Map$'); -ApiClient defaultApiClient = ApiClient(); - bool _isEpochMarker(String? pattern) => pattern == _dateEpochMarker || pattern == '/$_dateEpochMarker/'; diff --git a/modules/openapi-generator/src/main/resources/dart2/pubspec.mustache b/modules/openapi-generator/src/main/resources/dart2/pubspec.mustache index 8a74ffa028e7..db9df9709aca 100644 --- a/modules/openapi-generator/src/main/resources/dart2/pubspec.mustache +++ b/modules/openapi-generator/src/main/resources/dart2/pubspec.mustache @@ -15,6 +15,7 @@ publish_to: {{.}} environment: sdk: '>=2.12.0 <3.0.0' dependencies: + collection: '^1.17.0' http: '>=0.13.0 <0.14.0' intl: '^0.18.0' meta: '^1.1.8' @@ -22,4 +23,5 @@ dev_dependencies: test: '>=1.16.0 <1.18.0' {{#json_serializable}} build_runner: '^1.10.9' - json_serializable: '^3.5.1'{{/json_serializable}} + json_serializable: '^3.5.1' +{{/json_serializable}} diff --git a/modules/openapi-generator/src/main/resources/dart2/serialization/native/native_class.mustache b/modules/openapi-generator/src/main/resources/dart2/serialization/native/native_class.mustache index 6700c86ed1de..1d406ea46318 100644 --- a/modules/openapi-generator/src/main/resources/dart2/serialization/native/native_class.mustache +++ b/modules/openapi-generator/src/main/resources/dart2/serialization/native/native_class.mustache @@ -38,7 +38,7 @@ class {{{classname}}} { @override bool operator ==(Object other) => identical(this, other) || other is {{{classname}}} && {{#vars}} - other.{{{name}}} == {{{name}}}{{^-last}} &&{{/-last}}{{#-last}};{{/-last}} + {{#isMap}}_deepEquality.equals(other.{{{name}}}, {{{name}}}){{/isMap}}{{^isMap}}{{#isArray}}_deepEquality.equals(other.{{{name}}}, {{{name}}}){{/isArray}}{{^isArray}}other.{{{name}}} == {{{name}}}{{/isArray}}{{/isMap}}{{^-last}} &&{{/-last}}{{#-last}};{{/-last}} {{/vars}} @override diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api.dart index e7da4386a7dd..b1010dd5a231 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api.dart @@ -14,6 +14,7 @@ import 'dart:async'; import 'dart:convert'; import 'dart:io'; +import 'package:collection/collection.dart'; import 'package:http/http.dart'; import 'package:intl/intl.dart'; import 'package:meta/meta.dart'; @@ -39,13 +40,16 @@ part 'model/tag.dart'; part 'model/user.dart'; +/// An [ApiClient] instance that uses the default values obtained from +/// the OpenAPI specification file. +var defaultApiClient = ApiClient(); + const _delimiters = {'csv': ',', 'ssv': ' ', 'tsv': '\t', 'pipes': '|'}; const _dateEpochMarker = 'epoch'; +const _deepEquality = DeepCollectionEquality(); final _dateFormatter = DateFormat('yyyy-MM-dd'); final _regList = RegExp(r'^List<(.*)>$'); final _regSet = RegExp(r'^Set<(.*)>$'); final _regMap = RegExp(r'^Map$'); -ApiClient defaultApiClient = ApiClient(); - bool _isEpochMarker(String? pattern) => pattern == _dateEpochMarker || pattern == '/$_dateEpochMarker/'; diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/api_response.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/api_response.dart index 556c7ec4a96b..4ed31f5fe0ad 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/api_response.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/api_response.dart @@ -44,9 +44,9 @@ class ApiResponse { @override bool operator ==(Object other) => identical(this, other) || other is ApiResponse && - other.code == code && - other.type == type && - other.message == message; + other.code == code && + other.type == type && + other.message == message; @override int get hashCode => diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/category.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/category.dart index c5f0f4a8d278..4a64236f8550 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/category.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/category.dart @@ -35,8 +35,8 @@ class Category { @override bool operator ==(Object other) => identical(this, other) || other is Category && - other.id == id && - other.name == name; + other.id == id && + other.name == name; @override int get hashCode => diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/order.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/order.dart index e052dcc544a9..4871871516fe 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/order.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/order.dart @@ -60,12 +60,12 @@ class Order { @override bool operator ==(Object other) => identical(this, other) || other is Order && - other.id == id && - other.petId == petId && - other.quantity == quantity && - other.shipDate == shipDate && - other.status == status && - other.complete == complete; + other.id == id && + other.petId == petId && + other.quantity == quantity && + other.shipDate == shipDate && + other.status == status && + other.complete == complete; @override int get hashCode => diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/pet.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/pet.dart index a8e54d9920f0..8c17a4010ddf 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/pet.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/pet.dart @@ -48,12 +48,12 @@ class Pet { @override bool operator ==(Object other) => identical(this, other) || other is Pet && - other.id == id && - other.category == category && - other.name == name && - other.photoUrls == photoUrls && - other.tags == tags && - other.status == status; + other.id == id && + other.category == category && + other.name == name && + _deepEquality.equals(other.photoUrls, photoUrls) && + _deepEquality.equals(other.tags, tags) && + other.status == status; @override int get hashCode => diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/tag.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/tag.dart index bf557b6522a3..e96eeb3a769c 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/tag.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/tag.dart @@ -35,8 +35,8 @@ class Tag { @override bool operator ==(Object other) => identical(this, other) || other is Tag && - other.id == id && - other.name == name; + other.id == id && + other.name == name; @override int get hashCode => diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/user.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/user.dart index 57de27fd4052..14c98ee48d16 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/user.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/user.dart @@ -90,14 +90,14 @@ class User { @override bool operator ==(Object other) => identical(this, other) || other is User && - other.id == id && - other.username == username && - other.firstName == firstName && - other.lastName == lastName && - other.email == email && - other.password == password && - other.phone == phone && - other.userStatus == userStatus; + other.id == id && + other.username == username && + other.firstName == firstName && + other.lastName == lastName && + other.email == email && + other.password == password && + other.phone == phone && + other.userStatus == userStatus; @override int get hashCode => diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/pubspec.yaml b/samples/openapi3/client/petstore/dart2/petstore_client_lib/pubspec.yaml index 49f21520ec84..41ab08885c85 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/pubspec.yaml +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/pubspec.yaml @@ -9,9 +9,9 @@ homepage: 'homepage' environment: sdk: '>=2.12.0 <3.0.0' dependencies: + collection: '^1.17.0' http: '>=0.13.0 <0.14.0' intl: '^0.18.0' meta: '^1.1.8' dev_dependencies: test: '>=1.16.0 <1.18.0' - diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api.dart index 3354e842e543..c48f9bf6a260 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api.dart @@ -14,6 +14,7 @@ import 'dart:async'; import 'dart:convert'; import 'dart:io'; +import 'package:collection/collection.dart'; import 'package:http/http.dart'; import 'package:intl/intl.dart'; import 'package:meta/meta.dart'; @@ -84,13 +85,16 @@ part 'model/tag.dart'; part 'model/user.dart'; +/// An [ApiClient] instance that uses the default values obtained from +/// the OpenAPI specification file. +var defaultApiClient = ApiClient(); + const _delimiters = {'csv': ',', 'ssv': ' ', 'tsv': '\t', 'pipes': '|'}; const _dateEpochMarker = 'epoch'; +const _deepEquality = DeepCollectionEquality(); final _dateFormatter = DateFormat('yyyy-MM-dd'); final _regList = RegExp(r'^List<(.*)>$'); final _regSet = RegExp(r'^Set<(.*)>$'); final _regMap = RegExp(r'^Map$'); -ApiClient defaultApiClient = ApiClient(); - bool _isEpochMarker(String? pattern) => pattern == _dateEpochMarker || pattern == '/$_dateEpochMarker/'; diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/additional_properties_class.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/additional_properties_class.dart index 42a70fc7fba4..ac0b660489b5 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/additional_properties_class.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/additional_properties_class.dart @@ -23,8 +23,8 @@ class AdditionalPropertiesClass { @override bool operator ==(Object other) => identical(this, other) || other is AdditionalPropertiesClass && - other.mapProperty == mapProperty && - other.mapOfMapProperty == mapOfMapProperty; + _deepEquality.equals(other.mapProperty, mapProperty) && + _deepEquality.equals(other.mapOfMapProperty, mapOfMapProperty); @override int get hashCode => diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/all_of_with_single_ref.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/all_of_with_single_ref.dart index 9f43c826b408..7e4757242724 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/all_of_with_single_ref.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/all_of_with_single_ref.dart @@ -35,8 +35,8 @@ class AllOfWithSingleRef { @override bool operator ==(Object other) => identical(this, other) || other is AllOfWithSingleRef && - other.username == username && - other.singleRefType == singleRefType; + other.username == username && + other.singleRefType == singleRefType; @override int get hashCode => diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/animal.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/animal.dart index 0a2cd1bc4498..1ee9a56021ec 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/animal.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/animal.dart @@ -23,8 +23,8 @@ class Animal { @override bool operator ==(Object other) => identical(this, other) || other is Animal && - other.className == className && - other.color == color; + other.className == className && + other.color == color; @override int get hashCode => diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/api_response.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/api_response.dart index 556c7ec4a96b..4ed31f5fe0ad 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/api_response.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/api_response.dart @@ -44,9 +44,9 @@ class ApiResponse { @override bool operator ==(Object other) => identical(this, other) || other is ApiResponse && - other.code == code && - other.type == type && - other.message == message; + other.code == code && + other.type == type && + other.message == message; @override int get hashCode => diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/array_of_array_of_number_only.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/array_of_array_of_number_only.dart index 6066b348dbb5..ebc92fa35baa 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/array_of_array_of_number_only.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/array_of_array_of_number_only.dart @@ -20,7 +20,7 @@ class ArrayOfArrayOfNumberOnly { @override bool operator ==(Object other) => identical(this, other) || other is ArrayOfArrayOfNumberOnly && - other.arrayArrayNumber == arrayArrayNumber; + _deepEquality.equals(other.arrayArrayNumber, arrayArrayNumber); @override int get hashCode => diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/array_of_number_only.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/array_of_number_only.dart index 9275a619a5a1..c3d5b1c7928c 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/array_of_number_only.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/array_of_number_only.dart @@ -20,7 +20,7 @@ class ArrayOfNumberOnly { @override bool operator ==(Object other) => identical(this, other) || other is ArrayOfNumberOnly && - other.arrayNumber == arrayNumber; + _deepEquality.equals(other.arrayNumber, arrayNumber); @override int get hashCode => diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/array_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/array_test.dart index 282d225cfa6d..7d07c4f23545 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/array_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/array_test.dart @@ -26,9 +26,9 @@ class ArrayTest { @override bool operator ==(Object other) => identical(this, other) || other is ArrayTest && - other.arrayOfString == arrayOfString && - other.arrayArrayOfInteger == arrayArrayOfInteger && - other.arrayArrayOfModel == arrayArrayOfModel; + _deepEquality.equals(other.arrayOfString, arrayOfString) && + _deepEquality.equals(other.arrayArrayOfInteger, arrayArrayOfInteger) && + _deepEquality.equals(other.arrayArrayOfModel, arrayArrayOfModel); @override int get hashCode => diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/capitalization.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/capitalization.dart index 28c2e9d9c64c..84866a375ad3 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/capitalization.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/capitalization.dart @@ -72,12 +72,12 @@ class Capitalization { @override bool operator ==(Object other) => identical(this, other) || other is Capitalization && - other.smallCamel == smallCamel && - other.capitalCamel == capitalCamel && - other.smallSnake == smallSnake && - other.capitalSnake == capitalSnake && - other.sCAETHFlowPoints == sCAETHFlowPoints && - other.ATT_NAME == ATT_NAME; + other.smallCamel == smallCamel && + other.capitalCamel == capitalCamel && + other.smallSnake == smallSnake && + other.capitalSnake == capitalSnake && + other.sCAETHFlowPoints == sCAETHFlowPoints && + other.ATT_NAME == ATT_NAME; @override int get hashCode => diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/cat.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/cat.dart index 98d12dd09359..9e8ce7936156 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/cat.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/cat.dart @@ -32,9 +32,9 @@ class Cat { @override bool operator ==(Object other) => identical(this, other) || other is Cat && - other.className == className && - other.color == color && - other.declawed == declawed; + other.className == className && + other.color == color && + other.declawed == declawed; @override int get hashCode => diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/category.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/category.dart index 3d46deb157a1..78b2efe39735 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/category.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/category.dart @@ -29,8 +29,8 @@ class Category { @override bool operator ==(Object other) => identical(this, other) || other is Category && - other.id == id && - other.name == name; + other.id == id && + other.name == name; @override int get hashCode => diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/class_model.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/class_model.dart index 0308856e250a..a07e652c804e 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/class_model.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/class_model.dart @@ -26,7 +26,7 @@ class ClassModel { @override bool operator ==(Object other) => identical(this, other) || other is ClassModel && - other.class_ == class_; + other.class_ == class_; @override int get hashCode => diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/deprecated_object.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/deprecated_object.dart index facf8aa49110..d9e2be395cde 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/deprecated_object.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/deprecated_object.dart @@ -26,7 +26,7 @@ class DeprecatedObject { @override bool operator ==(Object other) => identical(this, other) || other is DeprecatedObject && - other.name == name; + other.name == name; @override int get hashCode => diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/dog.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/dog.dart index 512f5e4344e2..e68451440911 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/dog.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/dog.dart @@ -32,9 +32,9 @@ class Dog { @override bool operator ==(Object other) => identical(this, other) || other is Dog && - other.className == className && - other.color == color && - other.breed == breed; + other.className == className && + other.color == color && + other.breed == breed; @override int get hashCode => diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/enum_arrays.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/enum_arrays.dart index 9f48dc8afec9..467ff1aaaf78 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/enum_arrays.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/enum_arrays.dart @@ -23,8 +23,8 @@ class EnumArrays { @override bool operator ==(Object other) => identical(this, other) || other is EnumArrays && - other.justSymbol == justSymbol && - other.arrayEnum == arrayEnum; + other.justSymbol == justSymbol && + _deepEquality.equals(other.arrayEnum, arrayEnum); @override int get hashCode => diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/enum_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/enum_test.dart index a5afdc9ea1ec..d3e405221f9b 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/enum_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/enum_test.dart @@ -59,14 +59,14 @@ class EnumTest { @override bool operator ==(Object other) => identical(this, other) || other is EnumTest && - other.enumString == enumString && - other.enumStringRequired == enumStringRequired && - other.enumInteger == enumInteger && - other.enumNumber == enumNumber && - other.outerEnum == outerEnum && - other.outerEnumInteger == outerEnumInteger && - other.outerEnumDefaultValue == outerEnumDefaultValue && - other.outerEnumIntegerDefaultValue == outerEnumIntegerDefaultValue; + other.enumString == enumString && + other.enumStringRequired == enumStringRequired && + other.enumInteger == enumInteger && + other.enumNumber == enumNumber && + other.outerEnum == outerEnum && + other.outerEnumInteger == outerEnumInteger && + other.outerEnumDefaultValue == outerEnumDefaultValue && + other.outerEnumIntegerDefaultValue == outerEnumIntegerDefaultValue; @override int get hashCode => diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/fake_big_decimal_map200_response.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/fake_big_decimal_map200_response.dart index eae75fa0fa26..07c35ffbeb5b 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/fake_big_decimal_map200_response.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/fake_big_decimal_map200_response.dart @@ -29,8 +29,8 @@ class FakeBigDecimalMap200Response { @override bool operator ==(Object other) => identical(this, other) || other is FakeBigDecimalMap200Response && - other.someId == someId && - other.someMap == someMap; + other.someId == someId && + _deepEquality.equals(other.someMap, someMap); @override int get hashCode => diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/file_schema_test_class.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/file_schema_test_class.dart index 73b23874dc13..7243bbe4d687 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/file_schema_test_class.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/file_schema_test_class.dart @@ -29,8 +29,8 @@ class FileSchemaTestClass { @override bool operator ==(Object other) => identical(this, other) || other is FileSchemaTestClass && - other.file == file && - other.files == files; + other.file == file && + _deepEquality.equals(other.files, files); @override int get hashCode => diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/foo.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/foo.dart index 637f700923e4..60850737dbbf 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/foo.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/foo.dart @@ -20,7 +20,7 @@ class Foo { @override bool operator ==(Object other) => identical(this, other) || other is Foo && - other.bar == bar; + other.bar == bar; @override int get hashCode => diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/foo_get_default_response.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/foo_get_default_response.dart index a50b62d7be9c..6b0734ba2baf 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/foo_get_default_response.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/foo_get_default_response.dart @@ -26,7 +26,7 @@ class FooGetDefaultResponse { @override bool operator ==(Object other) => identical(this, other) || other is FooGetDefaultResponse && - other.string == string; + other.string == string; @override int get hashCode => diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/format_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/format_test.dart index 67d169c4d8a2..582bcab5a07b 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/format_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/format_test.dart @@ -149,22 +149,22 @@ class FormatTest { @override bool operator ==(Object other) => identical(this, other) || other is FormatTest && - other.integer == integer && - other.int32 == int32 && - other.int64 == int64 && - other.number == number && - other.float == float && - other.double_ == double_ && - other.decimal == decimal && - other.string == string && - other.byte == byte && - other.binary == binary && - other.date == date && - other.dateTime == dateTime && - other.uuid == uuid && - other.password == password && - other.patternWithDigits == patternWithDigits && - other.patternWithDigitsAndDelimiter == patternWithDigitsAndDelimiter; + other.integer == integer && + other.int32 == int32 && + other.int64 == int64 && + other.number == number && + other.float == float && + other.double_ == double_ && + other.decimal == decimal && + other.string == string && + other.byte == byte && + other.binary == binary && + other.date == date && + other.dateTime == dateTime && + other.uuid == uuid && + other.password == password && + other.patternWithDigits == patternWithDigits && + other.patternWithDigitsAndDelimiter == patternWithDigitsAndDelimiter; @override int get hashCode => diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/has_only_read_only.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/has_only_read_only.dart index 4211499352c7..d98b94526180 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/has_only_read_only.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/has_only_read_only.dart @@ -35,8 +35,8 @@ class HasOnlyReadOnly { @override bool operator ==(Object other) => identical(this, other) || other is HasOnlyReadOnly && - other.bar == bar && - other.foo == foo; + other.bar == bar && + other.foo == foo; @override int get hashCode => diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/health_check_result.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/health_check_result.dart index c8ce4c0c359b..0da0d7975cfc 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/health_check_result.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/health_check_result.dart @@ -20,7 +20,7 @@ class HealthCheckResult { @override bool operator ==(Object other) => identical(this, other) || other is HealthCheckResult && - other.nullableMessage == nullableMessage; + other.nullableMessage == nullableMessage; @override int get hashCode => diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/map_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/map_test.dart index 0a66b0722783..487af40478b1 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/map_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/map_test.dart @@ -29,10 +29,10 @@ class MapTest { @override bool operator ==(Object other) => identical(this, other) || other is MapTest && - other.mapMapOfString == mapMapOfString && - other.mapOfEnumString == mapOfEnumString && - other.directMap == directMap && - other.indirectMap == indirectMap; + _deepEquality.equals(other.mapMapOfString, mapMapOfString) && + _deepEquality.equals(other.mapOfEnumString, mapOfEnumString) && + _deepEquality.equals(other.directMap, directMap) && + _deepEquality.equals(other.indirectMap, indirectMap); @override int get hashCode => diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/mixed_properties_and_additional_properties_class.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/mixed_properties_and_additional_properties_class.dart index 976cbee2afea..654c6f441bb9 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/mixed_properties_and_additional_properties_class.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/mixed_properties_and_additional_properties_class.dart @@ -38,9 +38,9 @@ class MixedPropertiesAndAdditionalPropertiesClass { @override bool operator ==(Object other) => identical(this, other) || other is MixedPropertiesAndAdditionalPropertiesClass && - other.uuid == uuid && - other.dateTime == dateTime && - other.map == map; + other.uuid == uuid && + other.dateTime == dateTime && + _deepEquality.equals(other.map, map); @override int get hashCode => diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/model200_response.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/model200_response.dart index acaa8220f3eb..88516302d808 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/model200_response.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/model200_response.dart @@ -35,8 +35,8 @@ class Model200Response { @override bool operator ==(Object other) => identical(this, other) || other is Model200Response && - other.name == name && - other.class_ == class_; + other.name == name && + other.class_ == class_; @override int get hashCode => diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/model_client.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/model_client.dart index 9010847ca744..67a443b2af4a 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/model_client.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/model_client.dart @@ -26,7 +26,7 @@ class ModelClient { @override bool operator ==(Object other) => identical(this, other) || other is ModelClient && - other.client == client; + other.client == client; @override int get hashCode => diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/model_file.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/model_file.dart index 9b98486ecea7..978ce1d02f43 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/model_file.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/model_file.dart @@ -27,7 +27,7 @@ class ModelFile { @override bool operator ==(Object other) => identical(this, other) || other is ModelFile && - other.sourceURI == sourceURI; + other.sourceURI == sourceURI; @override int get hashCode => diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/model_list.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/model_list.dart index ca6abae44c9b..18e1cbb643bd 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/model_list.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/model_list.dart @@ -26,7 +26,7 @@ class ModelList { @override bool operator ==(Object other) => identical(this, other) || other is ModelList && - other.n123list == n123list; + other.n123list == n123list; @override int get hashCode => diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/model_return.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/model_return.dart index 087ca4cbfa9d..663223684c79 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/model_return.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/model_return.dart @@ -26,7 +26,7 @@ class ModelReturn { @override bool operator ==(Object other) => identical(this, other) || other is ModelReturn && - other.return_ == return_; + other.return_ == return_; @override int get hashCode => diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/name.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/name.dart index 92e8093a807a..c3675f19581e 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/name.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/name.dart @@ -47,10 +47,10 @@ class Name { @override bool operator ==(Object other) => identical(this, other) || other is Name && - other.name == name && - other.snakeCase == snakeCase && - other.property == property && - other.n123number == n123number; + other.name == name && + other.snakeCase == snakeCase && + other.property == property && + other.n123number == n123number; @override int get hashCode => diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/nullable_class.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/nullable_class.dart index ed9b75289ff2..ed6c53cd1062 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/nullable_class.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/nullable_class.dart @@ -53,18 +53,18 @@ class NullableClass { @override bool operator ==(Object other) => identical(this, other) || other is NullableClass && - other.integerProp == integerProp && - other.numberProp == numberProp && - other.booleanProp == booleanProp && - other.stringProp == stringProp && - other.dateProp == dateProp && - other.datetimeProp == datetimeProp && - other.arrayNullableProp == arrayNullableProp && - other.arrayAndItemsNullableProp == arrayAndItemsNullableProp && - other.arrayItemsNullable == arrayItemsNullable && - other.objectNullableProp == objectNullableProp && - other.objectAndItemsNullableProp == objectAndItemsNullableProp && - other.objectItemsNullable == objectItemsNullable; + other.integerProp == integerProp && + other.numberProp == numberProp && + other.booleanProp == booleanProp && + other.stringProp == stringProp && + other.dateProp == dateProp && + other.datetimeProp == datetimeProp && + _deepEquality.equals(other.arrayNullableProp, arrayNullableProp) && + _deepEquality.equals(other.arrayAndItemsNullableProp, arrayAndItemsNullableProp) && + _deepEquality.equals(other.arrayItemsNullable, arrayItemsNullable) && + _deepEquality.equals(other.objectNullableProp, objectNullableProp) && + _deepEquality.equals(other.objectAndItemsNullableProp, objectAndItemsNullableProp) && + _deepEquality.equals(other.objectItemsNullable, objectItemsNullable); @override int get hashCode => diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/number_only.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/number_only.dart index 74366c354254..14c9cde0d4d5 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/number_only.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/number_only.dart @@ -26,7 +26,7 @@ class NumberOnly { @override bool operator ==(Object other) => identical(this, other) || other is NumberOnly && - other.justNumber == justNumber; + other.justNumber == justNumber; @override int get hashCode => diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/object_with_deprecated_fields.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/object_with_deprecated_fields.dart index 2afb378ba25b..020c0fe55818 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/object_with_deprecated_fields.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/object_with_deprecated_fields.dart @@ -47,10 +47,10 @@ class ObjectWithDeprecatedFields { @override bool operator ==(Object other) => identical(this, other) || other is ObjectWithDeprecatedFields && - other.uuid == uuid && - other.id == id && - other.deprecatedRef == deprecatedRef && - other.bars == bars; + other.uuid == uuid && + other.id == id && + other.deprecatedRef == deprecatedRef && + _deepEquality.equals(other.bars, bars); @override int get hashCode => diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/order.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/order.dart index e052dcc544a9..4871871516fe 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/order.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/order.dart @@ -60,12 +60,12 @@ class Order { @override bool operator ==(Object other) => identical(this, other) || other is Order && - other.id == id && - other.petId == petId && - other.quantity == quantity && - other.shipDate == shipDate && - other.status == status && - other.complete == complete; + other.id == id && + other.petId == petId && + other.quantity == quantity && + other.shipDate == shipDate && + other.status == status && + other.complete == complete; @override int get hashCode => diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/outer_composite.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/outer_composite.dart index 2acc8f718dbb..a45764652ecb 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/outer_composite.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/outer_composite.dart @@ -44,9 +44,9 @@ class OuterComposite { @override bool operator ==(Object other) => identical(this, other) || other is OuterComposite && - other.myNumber == myNumber && - other.myString == myString && - other.myBoolean == myBoolean; + other.myNumber == myNumber && + other.myString == myString && + other.myBoolean == myBoolean; @override int get hashCode => diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/outer_object_with_enum_property.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/outer_object_with_enum_property.dart index 44aecf1a2955..db8febdb6558 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/outer_object_with_enum_property.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/outer_object_with_enum_property.dart @@ -20,7 +20,7 @@ class OuterObjectWithEnumProperty { @override bool operator ==(Object other) => identical(this, other) || other is OuterObjectWithEnumProperty && - other.value == value; + other.value == value; @override int get hashCode => diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/pet.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/pet.dart index 9e0c77e120b4..5c1cf7243841 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/pet.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/pet.dart @@ -48,12 +48,12 @@ class Pet { @override bool operator ==(Object other) => identical(this, other) || other is Pet && - other.id == id && - other.category == category && - other.name == name && - other.photoUrls == photoUrls && - other.tags == tags && - other.status == status; + other.id == id && + other.category == category && + other.name == name && + _deepEquality.equals(other.photoUrls, photoUrls) && + _deepEquality.equals(other.tags, tags) && + other.status == status; @override int get hashCode => diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/read_only_first.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/read_only_first.dart index e266da487457..17b1e2379164 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/read_only_first.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/read_only_first.dart @@ -35,8 +35,8 @@ class ReadOnlyFirst { @override bool operator ==(Object other) => identical(this, other) || other is ReadOnlyFirst && - other.bar == bar && - other.baz == baz; + other.bar == bar && + other.baz == baz; @override int get hashCode => diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/special_model_name.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/special_model_name.dart index 5d745143dcc1..e80724f18dda 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/special_model_name.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/special_model_name.dart @@ -26,7 +26,7 @@ class SpecialModelName { @override bool operator ==(Object other) => identical(this, other) || other is SpecialModelName && - other.dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket == dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket; + other.dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket == dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket; @override int get hashCode => diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/tag.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/tag.dart index bf557b6522a3..e96eeb3a769c 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/tag.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/tag.dart @@ -35,8 +35,8 @@ class Tag { @override bool operator ==(Object other) => identical(this, other) || other is Tag && - other.id == id && - other.name == name; + other.id == id && + other.name == name; @override int get hashCode => diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/user.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/user.dart index 57de27fd4052..14c98ee48d16 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/user.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/user.dart @@ -90,14 +90,14 @@ class User { @override bool operator ==(Object other) => identical(this, other) || other is User && - other.id == id && - other.username == username && - other.firstName == firstName && - other.lastName == lastName && - other.email == email && - other.password == password && - other.phone == phone && - other.userStatus == userStatus; + other.id == id && + other.username == username && + other.firstName == firstName && + other.lastName == lastName && + other.email == email && + other.password == password && + other.phone == phone && + other.userStatus == userStatus; @override int get hashCode => diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/pubspec.yaml b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/pubspec.yaml index 49f21520ec84..41ab08885c85 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/pubspec.yaml +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/pubspec.yaml @@ -9,9 +9,9 @@ homepage: 'homepage' environment: sdk: '>=2.12.0 <3.0.0' dependencies: + collection: '^1.17.0' http: '>=0.13.0 <0.14.0' intl: '^0.18.0' meta: '^1.1.8' dev_dependencies: test: '>=1.16.0 <1.18.0' -