forked from loafle/openapi-generator-original
[dart] Split mustache file by serialization (#8958)
* Split mustache file by serialization * Move specific serialization files to own directories * Deduplicate constructor in dart client generator
This commit is contained in:
parent
f8842b04bb
commit
8a11a1aa74
10
modules/openapi-generator/src/main/resources/dart2/dart_constructor.mustache
vendored
Normal file
10
modules/openapi-generator/src/main/resources/dart2/dart_constructor.mustache
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
/// Returns a new [{{{classname}}}] instance.
|
||||
{{{classname}}}({
|
||||
{{#vars}}
|
||||
{{!
|
||||
A field is @required in Dart when it is
|
||||
required && !nullable && !defaultValue in OAS
|
||||
}}
|
||||
{{#required}}{{^isNullable}}{{^defaultValue}}@required {{/defaultValue}}{{/isNullable}}{{/required}}this.{{{name}}}{{^isNullable}}{{#defaultValue}} = {{#isEnum}}{{^isContainer}}const {{{enumName}}}._({{/isContainer}}{{/isEnum}}{{{defaultValue}}}{{#isEnum}}{{^isContainer}}){{/isContainer}}{{/isEnum}}{{/defaultValue}}{{/isNullable}},
|
||||
{{/vars}}
|
||||
});
|
@ -3,10 +3,20 @@
|
||||
{{#models}}
|
||||
{{#model}}
|
||||
{{#isEnum}}
|
||||
{{>enum}}
|
||||
{{#native_serialization}}
|
||||
{{>serialization/native/native_enum}}
|
||||
{{/native_serialization}}
|
||||
{{#json_serializable}}
|
||||
{{>serialization/json_serializable/json_serializable_enum}}
|
||||
{{/json_serializable}}
|
||||
{{/isEnum}}
|
||||
{{^isEnum}}
|
||||
{{>class}}
|
||||
{{#native_serialization}}
|
||||
{{>serialization/native/native_class}}
|
||||
{{/native_serialization}}
|
||||
{{#json_serializable}}
|
||||
{{>serialization/json_serializable/json_serializable_class}}
|
||||
{{/json_serializable}}
|
||||
{{/isEnum}}
|
||||
{{/model}}
|
||||
{{/models}}
|
||||
|
@ -0,0 +1,70 @@
|
||||
@JsonSerializable(
|
||||
checked: true,
|
||||
createToJson: true,
|
||||
disallowUnrecognizedKeys: true,
|
||||
explicitToJson: true,
|
||||
)
|
||||
class {{{classname}}} {
|
||||
{{>dart_constructor}}
|
||||
|
||||
{{#vars}}
|
||||
{{#description}}
|
||||
/// {{{description}}}
|
||||
{{/description}}
|
||||
{{^isEnum}}
|
||||
{{#minimum}}
|
||||
// minimum: {{{minimum}}}
|
||||
{{/minimum}}
|
||||
{{#maximum}}
|
||||
// maximum: {{{maximum}}}
|
||||
{{/maximum}}
|
||||
{{/isEnum}}
|
||||
{{^isBinary}}
|
||||
@JsonKey(
|
||||
{{#defaultValue}}defaultValue: {{{defaultValue}}},{{/defaultValue}}{{^defaultValue}}nullable: {{isNullable}},{{/defaultValue}}
|
||||
name: r'{{{baseName}}}',
|
||||
required: {{#required}}true{{/required}}{{^required}}false{{/required}},
|
||||
)
|
||||
{{/isBinary}}
|
||||
{{#isBinary}}
|
||||
@JsonKey(ignore: true)
|
||||
{{/isBinary}}
|
||||
{{{datatypeWithEnum}}} {{{name}}};
|
||||
|
||||
{{/vars}}
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is {{{classname}}} &&
|
||||
{{#vars}}
|
||||
other.{{{name}}} == {{{name}}}{{^-last}} &&{{/-last}}{{#-last}};{{/-last}}
|
||||
{{/vars}}
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
{{#vars}}
|
||||
({{{name}}} == null ? 0 : {{{name}}}.hashCode){{^-last}} +{{/-last}}{{#-last}};{{/-last}}
|
||||
{{/vars}}
|
||||
|
||||
factory {{{classname}}}.fromJson(Map<String, dynamic> json) => _${{{classname}}}FromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _${{{classname}}}ToJson(this);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return toJson().toString();
|
||||
}
|
||||
|
||||
}
|
||||
{{#vars}}
|
||||
{{#isEnum}}
|
||||
{{^isContainer}}
|
||||
|
||||
{{>serialization/json_serializable/json_serializable_enum_inline}}
|
||||
{{/isContainer}}
|
||||
{{#isContainer}}
|
||||
{{#mostInnerItems}}
|
||||
|
||||
{{>serialization/json_serializable/json_serializable_enum_inline}}
|
||||
{{/mostInnerItems}}
|
||||
{{/isContainer}}
|
||||
{{/isEnum}}
|
||||
{{/vars}}
|
@ -0,0 +1,7 @@
|
||||
enum {{{classname}}} {
|
||||
{{#allowableValues}}
|
||||
{{#enumVars}}
|
||||
{{{name}}},
|
||||
{{/enumVars}}
|
||||
{{/allowableValues}}
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
{{#description}}/// {{{description}}}{{/description}}
|
||||
enum {{{enumName}}} {
|
||||
{{#allowableValues}}
|
||||
{{#enumVars}}
|
||||
{{{name}}},
|
||||
{{/enumVars}}
|
||||
{{/allowableValues}}
|
||||
}
|
@ -1,24 +1,6 @@
|
||||
{{#json_serializable}}
|
||||
@JsonSerializable(
|
||||
checked: true,
|
||||
createToJson: true,
|
||||
disallowUnrecognizedKeys: true,
|
||||
explicitToJson: true,
|
||||
)
|
||||
{{/json_serializable}}
|
||||
class {{{classname}}} {
|
||||
/// Returns a new [{{{classname}}}] instance.
|
||||
{{{classname}}}({
|
||||
{{#vars}}
|
||||
{{!
|
||||
A field is @required in Dart when it is
|
||||
required && !nullable && !defaultValue in OAS
|
||||
}}
|
||||
{{#required}}{{^isNullable}}{{^defaultValue}}@required {{/defaultValue}}{{/isNullable}}{{/required}}this.{{{name}}}{{^isNullable}}{{#defaultValue}} = {{#isEnum}}{{^isContainer}}const {{{enumName}}}._({{/isContainer}}{{/isEnum}}{{{defaultValue}}}{{#isEnum}}{{^isContainer}}){{/isContainer}}{{/isEnum}}{{/defaultValue}}{{/isNullable}},
|
||||
{{/vars}}
|
||||
});
|
||||
{{>dart_constructor}}
|
||||
|
||||
{{^json_serializable}}
|
||||
{{#vars}}
|
||||
{{#description}}
|
||||
/// {{{description}}}
|
||||
@ -34,34 +16,6 @@ class {{{classname}}} {
|
||||
{{{datatypeWithEnum}}} {{{name}}};
|
||||
|
||||
{{/vars}}
|
||||
{{/json_serializable}}
|
||||
{{#json_serializable}}
|
||||
{{#vars}}
|
||||
{{#description}}
|
||||
/// {{{description}}}
|
||||
{{/description}}
|
||||
{{^isEnum}}
|
||||
{{#minimum}}
|
||||
// minimum: {{{minimum}}}
|
||||
{{/minimum}}
|
||||
{{#maximum}}
|
||||
// maximum: {{{maximum}}}
|
||||
{{/maximum}}
|
||||
{{/isEnum}}
|
||||
{{^isBinary}}
|
||||
@JsonKey(
|
||||
{{#defaultValue}}defaultValue: {{{defaultValue}}},{{/defaultValue}}{{^defaultValue}}nullable: {{isNullable}},{{/defaultValue}}
|
||||
name: r'{{{baseName}}}',
|
||||
required: {{#required}}true{{/required}}{{^required}}false{{/required}},
|
||||
)
|
||||
{{/isBinary}}
|
||||
{{#isBinary}}
|
||||
@JsonKey(ignore: true)
|
||||
{{/isBinary}}
|
||||
{{{datatypeWithEnum}}} {{{name}}};
|
||||
|
||||
{{/vars}}
|
||||
{{/json_serializable}}
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is {{{classname}}} &&
|
||||
{{#vars}}
|
||||
@ -74,7 +28,6 @@ class {{{classname}}} {
|
||||
({{{name}}} == null ? 0 : {{{name}}}.hashCode){{^-last}} +{{/-last}}{{#-last}};{{/-last}}
|
||||
{{/vars}}
|
||||
|
||||
{{^json_serializable}}
|
||||
@override
|
||||
String toString() => '{{{classname}}}[{{#vars}}{{{name}}}=${{{name}}}{{^-last}}, {{/-last}}{{/vars}}]';
|
||||
|
||||
@ -256,30 +209,17 @@ class {{{classname}}} {
|
||||
}
|
||||
return map;
|
||||
}
|
||||
{{/json_serializable}}
|
||||
{{#json_serializable}}
|
||||
|
||||
factory {{{classname}}}.fromJson(Map<String, dynamic> json) => _${{{classname}}}FromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _${{{classname}}}ToJson(this);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return toJson().toString();
|
||||
}
|
||||
|
||||
{{/json_serializable}}
|
||||
}
|
||||
{{#vars}}
|
||||
{{#isEnum}}
|
||||
{{^isContainer}}
|
||||
|
||||
{{>enum_inline}}
|
||||
{{>serialization/native/native_enum_inline}}
|
||||
{{/isContainer}}
|
||||
{{#isContainer}}
|
||||
{{#mostInnerItems}}
|
||||
|
||||
{{>enum_inline}}
|
||||
{{>serialization/native/native_enum_inline}}
|
||||
{{/mostInnerItems}}
|
||||
{{/isContainer}}
|
||||
{{/isEnum}}
|
@ -1,5 +1,4 @@
|
||||
{{#description}}/// {{{description}}}{{/description}}
|
||||
{{^json_serializable}}
|
||||
class {{{classname}}} {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const {{{classname}}}._(this.value);
|
||||
@ -72,12 +71,4 @@ class {{{classname}}}TypeTransformer {
|
||||
|
||||
/// Singleton [{{{classname}}}TypeTransformer] instance.
|
||||
static {{{classname}}}TypeTransformer _instance;
|
||||
}{{/json_serializable}}{{#json_serializable}}
|
||||
enum {{{classname}}} {
|
||||
{{#allowableValues}}
|
||||
{{#enumVars}}
|
||||
{{{name}}},
|
||||
{{/enumVars}}
|
||||
{{/allowableValues}}
|
||||
}
|
||||
{{/json_serializable}}
|
||||
}
|
@ -1,5 +1,4 @@
|
||||
{{#description}}/// {{{description}}}{{/description}}
|
||||
{{^json_serializable}}
|
||||
class {{{enumName}}} {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const {{{enumName}}}._(this.value);
|
||||
@ -72,11 +71,4 @@ class {{{enumName}}}TypeTransformer {
|
||||
|
||||
/// Singleton [{{{enumName}}}TypeTransformer] instance.
|
||||
static {{{enumName}}}TypeTransformer _instance;
|
||||
}{{/json_serializable}}{{#json_serializable}}
|
||||
enum {{{enumName}}} {
|
||||
{{#allowableValues}}
|
||||
{{#enumVars}}
|
||||
{{{name}}},
|
||||
{{/enumVars}}
|
||||
{{/allowableValues}}
|
||||
}{{/json_serializable}}
|
||||
}
|
@ -46,7 +46,6 @@ class AdditionalPropertiesClass {
|
||||
(mapProperty == null ? 0 : mapProperty.hashCode) +
|
||||
(mapOfMapProperty == null ? 0 : mapOfMapProperty.hashCode);
|
||||
|
||||
|
||||
factory AdditionalPropertiesClass.fromJson(Map<String, dynamic> json) => _$AdditionalPropertiesClassFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$AdditionalPropertiesClassToJson(this);
|
||||
|
@ -46,7 +46,6 @@ class Animal {
|
||||
(className == null ? 0 : className.hashCode) +
|
||||
(color == null ? 0 : color.hashCode);
|
||||
|
||||
|
||||
factory Animal.fromJson(Map<String, dynamic> json) => _$AnimalFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$AnimalToJson(this);
|
||||
|
@ -56,7 +56,6 @@ class ApiResponse {
|
||||
(type == null ? 0 : type.hashCode) +
|
||||
(message == null ? 0 : message.hashCode);
|
||||
|
||||
|
||||
factory ApiResponse.fromJson(Map<String, dynamic> json) => _$ApiResponseFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$ApiResponseToJson(this);
|
||||
|
@ -36,7 +36,6 @@ class ArrayOfArrayOfNumberOnly {
|
||||
int get hashCode =>
|
||||
(arrayArrayNumber == null ? 0 : arrayArrayNumber.hashCode);
|
||||
|
||||
|
||||
factory ArrayOfArrayOfNumberOnly.fromJson(Map<String, dynamic> json) => _$ArrayOfArrayOfNumberOnlyFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$ArrayOfArrayOfNumberOnlyToJson(this);
|
||||
|
@ -36,7 +36,6 @@ class ArrayOfNumberOnly {
|
||||
int get hashCode =>
|
||||
(arrayNumber == null ? 0 : arrayNumber.hashCode);
|
||||
|
||||
|
||||
factory ArrayOfNumberOnly.fromJson(Map<String, dynamic> json) => _$ArrayOfNumberOnlyFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$ArrayOfNumberOnlyToJson(this);
|
||||
|
@ -56,7 +56,6 @@ class ArrayTest {
|
||||
(arrayArrayOfInteger == null ? 0 : arrayArrayOfInteger.hashCode) +
|
||||
(arrayArrayOfModel == null ? 0 : arrayArrayOfModel.hashCode);
|
||||
|
||||
|
||||
factory ArrayTest.fromJson(Map<String, dynamic> json) => _$ArrayTestFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$ArrayTestToJson(this);
|
||||
|
@ -87,7 +87,6 @@ class Capitalization {
|
||||
(sCAETHFlowPoints == null ? 0 : sCAETHFlowPoints.hashCode) +
|
||||
(ATT_NAME == null ? 0 : ATT_NAME.hashCode);
|
||||
|
||||
|
||||
factory Capitalization.fromJson(Map<String, dynamic> json) => _$CapitalizationFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$CapitalizationToJson(this);
|
||||
|
@ -56,7 +56,6 @@ class Cat {
|
||||
(color == null ? 0 : color.hashCode) +
|
||||
(declawed == null ? 0 : declawed.hashCode);
|
||||
|
||||
|
||||
factory Cat.fromJson(Map<String, dynamic> json) => _$CatFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$CatToJson(this);
|
||||
|
@ -36,7 +36,6 @@ class CatAllOf {
|
||||
int get hashCode =>
|
||||
(declawed == null ? 0 : declawed.hashCode);
|
||||
|
||||
|
||||
factory CatAllOf.fromJson(Map<String, dynamic> json) => _$CatAllOfFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$CatAllOfToJson(this);
|
||||
|
@ -46,7 +46,6 @@ class Category {
|
||||
(id == null ? 0 : id.hashCode) +
|
||||
(name == null ? 0 : name.hashCode);
|
||||
|
||||
|
||||
factory Category.fromJson(Map<String, dynamic> json) => _$CategoryFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$CategoryToJson(this);
|
||||
|
@ -36,7 +36,6 @@ class ClassModel {
|
||||
int get hashCode =>
|
||||
(class_ == null ? 0 : class_.hashCode);
|
||||
|
||||
|
||||
factory ClassModel.fromJson(Map<String, dynamic> json) => _$ClassModelFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$ClassModelToJson(this);
|
||||
|
@ -56,7 +56,6 @@ class Dog {
|
||||
(color == null ? 0 : color.hashCode) +
|
||||
(breed == null ? 0 : breed.hashCode);
|
||||
|
||||
|
||||
factory Dog.fromJson(Map<String, dynamic> json) => _$DogFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$DogToJson(this);
|
||||
|
@ -36,7 +36,6 @@ class DogAllOf {
|
||||
int get hashCode =>
|
||||
(breed == null ? 0 : breed.hashCode);
|
||||
|
||||
|
||||
factory DogAllOf.fromJson(Map<String, dynamic> json) => _$DogAllOfFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$DogAllOfToJson(this);
|
||||
|
@ -46,7 +46,6 @@ class EnumArrays {
|
||||
(justSymbol == null ? 0 : justSymbol.hashCode) +
|
||||
(arrayEnum == null ? 0 : arrayEnum.hashCode);
|
||||
|
||||
|
||||
factory EnumArrays.fromJson(Map<String, dynamic> json) => _$EnumArraysFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$EnumArraysToJson(this);
|
||||
@ -59,14 +58,12 @@ class EnumArrays {
|
||||
}
|
||||
|
||||
|
||||
|
||||
enum EnumArraysJustSymbolEnum {
|
||||
greaterThanEqual,
|
||||
dollar,
|
||||
}
|
||||
|
||||
|
||||
|
||||
enum EnumArraysArrayEnumEnum {
|
||||
fish,
|
||||
crab,
|
||||
|
@ -9,11 +9,8 @@
|
||||
|
||||
part of openapi.api;
|
||||
|
||||
|
||||
|
||||
enum EnumClass {
|
||||
abc,
|
||||
efg,
|
||||
leftParenthesisXyzRightParenthesis,
|
||||
abc,
|
||||
efg,
|
||||
leftParenthesisXyzRightParenthesis,
|
||||
}
|
||||
|
||||
|
@ -106,7 +106,6 @@ class EnumTest {
|
||||
(outerEnumDefaultValue == null ? 0 : outerEnumDefaultValue.hashCode) +
|
||||
(outerEnumIntegerDefaultValue == null ? 0 : outerEnumIntegerDefaultValue.hashCode);
|
||||
|
||||
|
||||
factory EnumTest.fromJson(Map<String, dynamic> json) => _$EnumTestFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$EnumTestToJson(this);
|
||||
@ -119,7 +118,6 @@ class EnumTest {
|
||||
}
|
||||
|
||||
|
||||
|
||||
enum EnumTestEnumStringEnum {
|
||||
UPPER,
|
||||
lower,
|
||||
@ -127,7 +125,6 @@ enum EnumTestEnumStringEnum {
|
||||
}
|
||||
|
||||
|
||||
|
||||
enum EnumTestEnumStringRequiredEnum {
|
||||
UPPER,
|
||||
lower,
|
||||
@ -135,14 +132,12 @@ enum EnumTestEnumStringRequiredEnum {
|
||||
}
|
||||
|
||||
|
||||
|
||||
enum EnumTestEnumIntegerEnum {
|
||||
number1,
|
||||
numberNegative1,
|
||||
}
|
||||
|
||||
|
||||
|
||||
enum EnumTestEnumNumberEnum {
|
||||
number1Period1,
|
||||
numberNegative1Period2,
|
||||
|
@ -46,7 +46,6 @@ class FileSchemaTestClass {
|
||||
(file == null ? 0 : file.hashCode) +
|
||||
(files == null ? 0 : files.hashCode);
|
||||
|
||||
|
||||
factory FileSchemaTestClass.fromJson(Map<String, dynamic> json) => _$FileSchemaTestClassFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$FileSchemaTestClassToJson(this);
|
||||
|
@ -36,7 +36,6 @@ class Foo {
|
||||
int get hashCode =>
|
||||
(bar == null ? 0 : bar.hashCode);
|
||||
|
||||
|
||||
factory Foo.fromJson(Map<String, dynamic> json) => _$FooFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$FooToJson(this);
|
||||
|
@ -194,7 +194,6 @@ class FormatTest {
|
||||
(patternWithDigits == null ? 0 : patternWithDigits.hashCode) +
|
||||
(patternWithDigitsAndDelimiter == null ? 0 : patternWithDigitsAndDelimiter.hashCode);
|
||||
|
||||
|
||||
factory FormatTest.fromJson(Map<String, dynamic> json) => _$FormatTestFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$FormatTestToJson(this);
|
||||
|
@ -46,7 +46,6 @@ class HasOnlyReadOnly {
|
||||
(bar == null ? 0 : bar.hashCode) +
|
||||
(foo == null ? 0 : foo.hashCode);
|
||||
|
||||
|
||||
factory HasOnlyReadOnly.fromJson(Map<String, dynamic> json) => _$HasOnlyReadOnlyFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$HasOnlyReadOnlyToJson(this);
|
||||
|
@ -36,7 +36,6 @@ class HealthCheckResult {
|
||||
int get hashCode =>
|
||||
(nullableMessage == null ? 0 : nullableMessage.hashCode);
|
||||
|
||||
|
||||
factory HealthCheckResult.fromJson(Map<String, dynamic> json) => _$HealthCheckResultFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$HealthCheckResultToJson(this);
|
||||
|
@ -36,7 +36,6 @@ class InlineResponseDefault {
|
||||
int get hashCode =>
|
||||
(string == null ? 0 : string.hashCode);
|
||||
|
||||
|
||||
factory InlineResponseDefault.fromJson(Map<String, dynamic> json) => _$InlineResponseDefaultFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$InlineResponseDefaultToJson(this);
|
||||
|
@ -66,7 +66,6 @@ class MapTest {
|
||||
(directMap == null ? 0 : directMap.hashCode) +
|
||||
(indirectMap == null ? 0 : indirectMap.hashCode);
|
||||
|
||||
|
||||
factory MapTest.fromJson(Map<String, dynamic> json) => _$MapTestFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$MapTestToJson(this);
|
||||
@ -79,7 +78,6 @@ class MapTest {
|
||||
}
|
||||
|
||||
|
||||
|
||||
enum MapTestMapOfEnumStringEnum {
|
||||
UPPER,
|
||||
lower,
|
||||
|
@ -56,7 +56,6 @@ class MixedPropertiesAndAdditionalPropertiesClass {
|
||||
(dateTime == null ? 0 : dateTime.hashCode) +
|
||||
(map == null ? 0 : map.hashCode);
|
||||
|
||||
|
||||
factory MixedPropertiesAndAdditionalPropertiesClass.fromJson(Map<String, dynamic> json) => _$MixedPropertiesAndAdditionalPropertiesClassFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$MixedPropertiesAndAdditionalPropertiesClassToJson(this);
|
||||
|
@ -46,7 +46,6 @@ class Model200Response {
|
||||
(name == null ? 0 : name.hashCode) +
|
||||
(class_ == null ? 0 : class_.hashCode);
|
||||
|
||||
|
||||
factory Model200Response.fromJson(Map<String, dynamic> json) => _$Model200ResponseFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$Model200ResponseToJson(this);
|
||||
|
@ -36,7 +36,6 @@ class ModelClient {
|
||||
int get hashCode =>
|
||||
(client == null ? 0 : client.hashCode);
|
||||
|
||||
|
||||
factory ModelClient.fromJson(Map<String, dynamic> json) => _$ModelClientFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$ModelClientToJson(this);
|
||||
|
@ -37,7 +37,6 @@ class ModelFile {
|
||||
int get hashCode =>
|
||||
(sourceURI == null ? 0 : sourceURI.hashCode);
|
||||
|
||||
|
||||
factory ModelFile.fromJson(Map<String, dynamic> json) => _$ModelFileFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$ModelFileToJson(this);
|
||||
|
@ -36,7 +36,6 @@ class ModelList {
|
||||
int get hashCode =>
|
||||
(n123list == null ? 0 : n123list.hashCode);
|
||||
|
||||
|
||||
factory ModelList.fromJson(Map<String, dynamic> json) => _$ModelListFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$ModelListToJson(this);
|
||||
|
@ -36,7 +36,6 @@ class ModelReturn {
|
||||
int get hashCode =>
|
||||
(return_ == null ? 0 : return_.hashCode);
|
||||
|
||||
|
||||
factory ModelReturn.fromJson(Map<String, dynamic> json) => _$ModelReturnFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$ModelReturnToJson(this);
|
||||
|
@ -66,7 +66,6 @@ class Name {
|
||||
(property == null ? 0 : property.hashCode) +
|
||||
(n123number == null ? 0 : n123number.hashCode);
|
||||
|
||||
|
||||
factory Name.fromJson(Map<String, dynamic> json) => _$NameFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$NameToJson(this);
|
||||
|
@ -146,7 +146,6 @@ class NullableClass {
|
||||
(objectAndItemsNullableProp == null ? 0 : objectAndItemsNullableProp.hashCode) +
|
||||
(objectItemsNullable == null ? 0 : objectItemsNullable.hashCode);
|
||||
|
||||
|
||||
factory NullableClass.fromJson(Map<String, dynamic> json) => _$NullableClassFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$NullableClassToJson(this);
|
||||
|
@ -36,7 +36,6 @@ class NumberOnly {
|
||||
int get hashCode =>
|
||||
(justNumber == null ? 0 : justNumber.hashCode);
|
||||
|
||||
|
||||
factory NumberOnly.fromJson(Map<String, dynamic> json) => _$NumberOnlyFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$NumberOnlyToJson(this);
|
||||
|
@ -87,7 +87,6 @@ class Order {
|
||||
(status == null ? 0 : status.hashCode) +
|
||||
(complete == null ? 0 : complete.hashCode);
|
||||
|
||||
|
||||
factory Order.fromJson(Map<String, dynamic> json) => _$OrderFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$OrderToJson(this);
|
||||
@ -100,7 +99,6 @@ class Order {
|
||||
}
|
||||
|
||||
/// Order Status
|
||||
|
||||
enum OrderStatusEnum {
|
||||
placed,
|
||||
approved,
|
||||
|
@ -56,7 +56,6 @@ class OuterComposite {
|
||||
(myString == null ? 0 : myString.hashCode) +
|
||||
(myBoolean == null ? 0 : myBoolean.hashCode);
|
||||
|
||||
|
||||
factory OuterComposite.fromJson(Map<String, dynamic> json) => _$OuterCompositeFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$OuterCompositeToJson(this);
|
||||
|
@ -9,11 +9,8 @@
|
||||
|
||||
part of openapi.api;
|
||||
|
||||
|
||||
|
||||
enum OuterEnum {
|
||||
placed,
|
||||
approved,
|
||||
delivered,
|
||||
placed,
|
||||
approved,
|
||||
delivered,
|
||||
}
|
||||
|
||||
|
@ -9,11 +9,8 @@
|
||||
|
||||
part of openapi.api;
|
||||
|
||||
|
||||
|
||||
enum OuterEnumDefaultValue {
|
||||
placed,
|
||||
approved,
|
||||
delivered,
|
||||
placed,
|
||||
approved,
|
||||
delivered,
|
||||
}
|
||||
|
||||
|
@ -9,11 +9,8 @@
|
||||
|
||||
part of openapi.api;
|
||||
|
||||
|
||||
|
||||
enum OuterEnumInteger {
|
||||
number0,
|
||||
number1,
|
||||
number2,
|
||||
number0,
|
||||
number1,
|
||||
number2,
|
||||
}
|
||||
|
||||
|
@ -9,11 +9,8 @@
|
||||
|
||||
part of openapi.api;
|
||||
|
||||
|
||||
|
||||
enum OuterEnumIntegerDefaultValue {
|
||||
number0,
|
||||
number1,
|
||||
number2,
|
||||
number0,
|
||||
number1,
|
||||
number2,
|
||||
}
|
||||
|
||||
|
@ -36,7 +36,6 @@ class OuterObjectWithEnumProperty {
|
||||
int get hashCode =>
|
||||
(value == null ? 0 : value.hashCode);
|
||||
|
||||
|
||||
factory OuterObjectWithEnumProperty.fromJson(Map<String, dynamic> json) => _$OuterObjectWithEnumPropertyFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$OuterObjectWithEnumPropertyToJson(this);
|
||||
|
@ -87,7 +87,6 @@ class Pet {
|
||||
(tags == null ? 0 : tags.hashCode) +
|
||||
(status == null ? 0 : status.hashCode);
|
||||
|
||||
|
||||
factory Pet.fromJson(Map<String, dynamic> json) => _$PetFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$PetToJson(this);
|
||||
@ -100,7 +99,6 @@ class Pet {
|
||||
}
|
||||
|
||||
/// pet status in the store
|
||||
|
||||
enum PetStatusEnum {
|
||||
available,
|
||||
pending,
|
||||
|
@ -46,7 +46,6 @@ class ReadOnlyFirst {
|
||||
(bar == null ? 0 : bar.hashCode) +
|
||||
(baz == null ? 0 : baz.hashCode);
|
||||
|
||||
|
||||
factory ReadOnlyFirst.fromJson(Map<String, dynamic> json) => _$ReadOnlyFirstFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$ReadOnlyFirstToJson(this);
|
||||
|
@ -36,7 +36,6 @@ class SpecialModelName {
|
||||
int get hashCode =>
|
||||
(dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket == null ? 0 : dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket.hashCode);
|
||||
|
||||
|
||||
factory SpecialModelName.fromJson(Map<String, dynamic> json) => _$SpecialModelNameFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$SpecialModelNameToJson(this);
|
||||
|
@ -46,7 +46,6 @@ class Tag {
|
||||
(id == null ? 0 : id.hashCode) +
|
||||
(name == null ? 0 : name.hashCode);
|
||||
|
||||
|
||||
factory Tag.fromJson(Map<String, dynamic> json) => _$TagFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$TagToJson(this);
|
||||
|
@ -107,7 +107,6 @@ class User {
|
||||
(phone == null ? 0 : phone.hashCode) +
|
||||
(userStatus == null ? 0 : userStatus.hashCode);
|
||||
|
||||
|
||||
factory User.fromJson(Map<String, dynamic> json) => _$UserFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$UserToJson(this);
|
||||
|
Loading…
x
Reference in New Issue
Block a user