forked from loafle/openapi-generator-original
Drop default value when unnecessary. (#15368)
* Drop default value when unnecessary. * Simplify code. * Simplify code. * Generate Petstore sample code.
This commit is contained in:
parent
42fa07dd33
commit
fefbfd6aa2
@ -141,7 +141,7 @@ class {{{classname}}} {
|
|||||||
{{{name}}}: json[r'{{{baseName}}}'] is List
|
{{{name}}}: json[r'{{{baseName}}}'] is List
|
||||||
? (json[r'{{{baseName}}}'] as List).map((e) =>
|
? (json[r'{{{baseName}}}'] as List).map((e) =>
|
||||||
{{#items.complexType}}
|
{{#items.complexType}}
|
||||||
{{items.complexType}}.listFromJson(json[r'{{{baseName}}}']){{#required}}{{^isNullable}}!{{/isNullable}}{{#uniqueItems}}.toSet(){{/uniqueItems}}{{/required}}{{^required}}{{#defaultValue}} ?? {{{.}}}{{/defaultValue}}{{/required}}
|
{{items.complexType}}.listFromJson(json[r'{{{baseName}}}']){{#uniqueItems}}.toSet(){{/uniqueItems}}
|
||||||
{{/items.complexType}}
|
{{/items.complexType}}
|
||||||
{{^items.complexType}}
|
{{^items.complexType}}
|
||||||
e == null ? {{#items.isNullable}}null{{/items.isNullable}}{{^items.isNullable}}const <{{items.items.dataType}}>[]{{/items.isNullable}} : (e as List).cast<{{items.items.dataType}}>()
|
e == null ? {{#items.isNullable}}null{{/items.isNullable}}{{^items.isNullable}}const <{{items.items.dataType}}>[]{{/items.isNullable}} : (e as List).cast<{{items.items.dataType}}>()
|
||||||
@ -150,7 +150,7 @@ class {{{classname}}} {
|
|||||||
: {{#isNullable}}null{{/isNullable}}{{^isNullable}}const []{{/isNullable}},
|
: {{#isNullable}}null{{/isNullable}}{{^isNullable}}const []{{/isNullable}},
|
||||||
{{/items.isArray}}
|
{{/items.isArray}}
|
||||||
{{^items.isArray}}
|
{{^items.isArray}}
|
||||||
{{{name}}}: {{{complexType}}}.listFromJson(json[r'{{{baseName}}}']){{#required}}{{^isNullable}}!{{/isNullable}}{{#uniqueItems}}.toSet(){{/uniqueItems}}{{/required}}{{^required}}{{#defaultValue}} ?? {{{.}}}{{/defaultValue}}{{/required}},
|
{{{name}}}: {{{complexType}}}.listFromJson(json[r'{{{baseName}}}']){{#uniqueItems}}.toSet(){{/uniqueItems}},
|
||||||
{{/items.isArray}}
|
{{/items.isArray}}
|
||||||
{{/isArray}}
|
{{/isArray}}
|
||||||
{{^isArray}}
|
{{^isArray}}
|
||||||
@ -168,7 +168,7 @@ class {{{classname}}} {
|
|||||||
{{^items.isArray}}
|
{{^items.isArray}}
|
||||||
{{#items.isMap}}
|
{{#items.isMap}}
|
||||||
{{#items.complexType}}
|
{{#items.complexType}}
|
||||||
{{{name}}}: {{items.complexType}}.mapFromJson(json[r'{{{baseName}}}']){{#required}}{{^isNullable}}!{{/isNullable}}{{/required}}{{^required}}{{#defaultValue}} ?? {{{.}}}{{/defaultValue}}{{/required}},
|
{{{name}}}: {{items.complexType}}.mapFromJson(json[r'{{{baseName}}}']),
|
||||||
{{/items.complexType}}
|
{{/items.complexType}}
|
||||||
{{^items.complexType}}
|
{{^items.complexType}}
|
||||||
{{{name}}}: mapCastOfType<String, dynamic>(json, r'{{{baseName}}}'){{#required}}{{^isNullable}}!{{/isNullable}}{{/required}}{{^required}}{{#defaultValue}} ?? {{{.}}}{{/defaultValue}}{{/required}},
|
{{{name}}}: mapCastOfType<String, dynamic>(json, r'{{{baseName}}}'){{#required}}{{^isNullable}}!{{/isNullable}}{{/required}}{{^required}}{{#defaultValue}} ?? {{{.}}}{{/defaultValue}}{{/required}},
|
||||||
@ -176,7 +176,7 @@ class {{{classname}}} {
|
|||||||
{{/items.isMap}}
|
{{/items.isMap}}
|
||||||
{{^items.isMap}}
|
{{^items.isMap}}
|
||||||
{{#items.complexType}}
|
{{#items.complexType}}
|
||||||
{{{name}}}: {{{items.complexType}}}.mapFromJson(json[r'{{{baseName}}}'{{#required}}{{^isNullable}}!{{/isNullable}}{{/required}}{{^required}}{{#defaultValue}}]) ?? {{{.}}}{{/defaultValue}}{{/required}},
|
{{{name}}}: {{{items.complexType}}}.mapFromJson(json[r'{{{baseName}}}']),
|
||||||
{{/items.complexType}}
|
{{/items.complexType}}
|
||||||
{{^items.complexType}}
|
{{^items.complexType}}
|
||||||
{{{name}}}: mapCastOfType<String, {{items.dataType}}>(json, r'{{{baseName}}}'){{#required}}{{^isNullable}}!{{/isNullable}}{{/required}}{{^required}}{{#defaultValue}} ?? {{{.}}}{{/defaultValue}}{{/required}},
|
{{{name}}}: mapCastOfType<String, {{items.dataType}}>(json, r'{{{baseName}}}'){{#required}}{{^isNullable}}!{{/isNullable}}{{/required}}{{^required}}{{#defaultValue}} ?? {{{.}}}{{/defaultValue}}{{/required}},
|
||||||
@ -197,7 +197,7 @@ class {{{classname}}} {
|
|||||||
{{^complexType}}
|
{{^complexType}}
|
||||||
{{#isArray}}
|
{{#isArray}}
|
||||||
{{#isEnum}}
|
{{#isEnum}}
|
||||||
{{{name}}}: {{{items.datatypeWithEnum}}}.listFromJson(json[r'{{{baseName}}}']){{#required}}{{^isNullable}}!{{/isNullable}}{{#uniqueItems}}.toSet(){{/uniqueItems}}{{/required}}{{^required}}{{#defaultValue}} ?? {{{.}}}{{/defaultValue}}{{/required}},
|
{{{name}}}: {{{items.datatypeWithEnum}}}.listFromJson(json[r'{{{baseName}}}']){{#uniqueItems}}.toSet(){{/uniqueItems}},
|
||||||
{{/isEnum}}
|
{{/isEnum}}
|
||||||
{{^isEnum}}
|
{{^isEnum}}
|
||||||
{{{name}}}: json[r'{{{baseName}}}'] is {{#uniqueItems}}Set{{/uniqueItems}}{{^uniqueItems}}List{{/uniqueItems}}
|
{{{name}}}: json[r'{{{baseName}}}'] is {{#uniqueItems}}Set{{/uniqueItems}}{{^uniqueItems}}List{{/uniqueItems}}
|
||||||
@ -234,7 +234,7 @@ class {{{classname}}} {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
static List<{{{classname}}}>? listFromJson(dynamic json, {bool growable = false,}) {
|
static List<{{{classname}}}> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final result = <{{{classname}}}>[];
|
final result = <{{{classname}}}>[];
|
||||||
if (json is List && json.isNotEmpty) {
|
if (json is List && json.isNotEmpty) {
|
||||||
for (final row in json) {
|
for (final row in json) {
|
||||||
@ -265,12 +265,10 @@ class {{{classname}}} {
|
|||||||
static Map<String, List<{{{classname}}}>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
static Map<String, List<{{{classname}}}>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final map = <String, List<{{{classname}}}>>{};
|
final map = <String, List<{{{classname}}}>>{};
|
||||||
if (json is Map && json.isNotEmpty) {
|
if (json is Map && json.isNotEmpty) {
|
||||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
for (final entry in json.entries) {
|
for (final entry in json.entries) {
|
||||||
final value = {{{classname}}}.listFromJson(entry.value, growable: growable,);
|
map[entry.key] = {{{classname}}}.listFromJson(entry.value, growable: growable,);
|
||||||
if (value != null) {
|
|
||||||
map[entry.key] = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
|
@ -28,7 +28,7 @@ class {{{classname}}} {
|
|||||||
|
|
||||||
static {{{classname}}}? fromJson(dynamic value) => {{{classname}}}TypeTransformer().decode(value);
|
static {{{classname}}}? fromJson(dynamic value) => {{{classname}}}TypeTransformer().decode(value);
|
||||||
|
|
||||||
static List<{{{classname}}}>? listFromJson(dynamic json, {bool growable = false,}) {
|
static List<{{{classname}}}> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final result = <{{{classname}}}>[];
|
final result = <{{{classname}}}>[];
|
||||||
if (json is List && json.isNotEmpty) {
|
if (json is List && json.isNotEmpty) {
|
||||||
for (final row in json) {
|
for (final row in json) {
|
||||||
|
@ -28,7 +28,7 @@ class {{{enumName}}} {
|
|||||||
|
|
||||||
static {{{enumName}}}? fromJson(dynamic value) => {{{enumName}}}TypeTransformer().decode(value);
|
static {{{enumName}}}? fromJson(dynamic value) => {{{enumName}}}TypeTransformer().decode(value);
|
||||||
|
|
||||||
static List<{{{enumName}}}>? listFromJson(dynamic json, {bool growable = false,}) {
|
static List<{{{enumName}}}> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final result = <{{{enumName}}}>[];
|
final result = <{{{enumName}}}>[];
|
||||||
if (json is List && json.isNotEmpty) {
|
if (json is List && json.isNotEmpty) {
|
||||||
for (final row in json) {
|
for (final row in json) {
|
||||||
|
@ -105,7 +105,7 @@ class ApiResponse {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
static List<ApiResponse>? listFromJson(dynamic json, {bool growable = false,}) {
|
static List<ApiResponse> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final result = <ApiResponse>[];
|
final result = <ApiResponse>[];
|
||||||
if (json is List && json.isNotEmpty) {
|
if (json is List && json.isNotEmpty) {
|
||||||
for (final row in json) {
|
for (final row in json) {
|
||||||
@ -136,12 +136,10 @@ class ApiResponse {
|
|||||||
static Map<String, List<ApiResponse>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
static Map<String, List<ApiResponse>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final map = <String, List<ApiResponse>>{};
|
final map = <String, List<ApiResponse>>{};
|
||||||
if (json is Map && json.isNotEmpty) {
|
if (json is Map && json.isNotEmpty) {
|
||||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
for (final entry in json.entries) {
|
for (final entry in json.entries) {
|
||||||
final value = ApiResponse.listFromJson(entry.value, growable: growable,);
|
map[entry.key] = ApiResponse.listFromJson(entry.value, growable: growable,);
|
||||||
if (value != null) {
|
|
||||||
map[entry.key] = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
|
@ -88,7 +88,7 @@ class Category {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
static List<Category>? listFromJson(dynamic json, {bool growable = false,}) {
|
static List<Category> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final result = <Category>[];
|
final result = <Category>[];
|
||||||
if (json is List && json.isNotEmpty) {
|
if (json is List && json.isNotEmpty) {
|
||||||
for (final row in json) {
|
for (final row in json) {
|
||||||
@ -119,12 +119,10 @@ class Category {
|
|||||||
static Map<String, List<Category>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
static Map<String, List<Category>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final map = <String, List<Category>>{};
|
final map = <String, List<Category>>{};
|
||||||
if (json is Map && json.isNotEmpty) {
|
if (json is Map && json.isNotEmpty) {
|
||||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
for (final entry in json.entries) {
|
for (final entry in json.entries) {
|
||||||
final value = Category.listFromJson(entry.value, growable: growable,);
|
map[entry.key] = Category.listFromJson(entry.value, growable: growable,);
|
||||||
if (value != null) {
|
|
||||||
map[entry.key] = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
|
@ -141,7 +141,7 @@ class Order {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
static List<Order>? listFromJson(dynamic json, {bool growable = false,}) {
|
static List<Order> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final result = <Order>[];
|
final result = <Order>[];
|
||||||
if (json is List && json.isNotEmpty) {
|
if (json is List && json.isNotEmpty) {
|
||||||
for (final row in json) {
|
for (final row in json) {
|
||||||
@ -172,12 +172,10 @@ class Order {
|
|||||||
static Map<String, List<Order>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
static Map<String, List<Order>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final map = <String, List<Order>>{};
|
final map = <String, List<Order>>{};
|
||||||
if (json is Map && json.isNotEmpty) {
|
if (json is Map && json.isNotEmpty) {
|
||||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
for (final entry in json.entries) {
|
for (final entry in json.entries) {
|
||||||
final value = Order.listFromJson(entry.value, growable: growable,);
|
map[entry.key] = Order.listFromJson(entry.value, growable: growable,);
|
||||||
if (value != null) {
|
|
||||||
map[entry.key] = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
@ -214,7 +212,7 @@ class OrderStatusEnum {
|
|||||||
|
|
||||||
static OrderStatusEnum? fromJson(dynamic value) => OrderStatusEnumTypeTransformer().decode(value);
|
static OrderStatusEnum? fromJson(dynamic value) => OrderStatusEnumTypeTransformer().decode(value);
|
||||||
|
|
||||||
static List<OrderStatusEnum>? listFromJson(dynamic json, {bool growable = false,}) {
|
static List<OrderStatusEnum> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final result = <OrderStatusEnum>[];
|
final result = <OrderStatusEnum>[];
|
||||||
if (json is List && json.isNotEmpty) {
|
if (json is List && json.isNotEmpty) {
|
||||||
for (final row in json) {
|
for (final row in json) {
|
||||||
|
@ -116,14 +116,14 @@ class Pet {
|
|||||||
photoUrls: json[r'photoUrls'] is List
|
photoUrls: json[r'photoUrls'] is List
|
||||||
? (json[r'photoUrls'] as List).cast<String>()
|
? (json[r'photoUrls'] as List).cast<String>()
|
||||||
: const [],
|
: const [],
|
||||||
tags: Tag.listFromJson(json[r'tags']) ?? const [],
|
tags: Tag.listFromJson(json[r'tags']),
|
||||||
status: PetStatusEnum.fromJson(json[r'status']),
|
status: PetStatusEnum.fromJson(json[r'status']),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
static List<Pet>? listFromJson(dynamic json, {bool growable = false,}) {
|
static List<Pet> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final result = <Pet>[];
|
final result = <Pet>[];
|
||||||
if (json is List && json.isNotEmpty) {
|
if (json is List && json.isNotEmpty) {
|
||||||
for (final row in json) {
|
for (final row in json) {
|
||||||
@ -154,12 +154,10 @@ class Pet {
|
|||||||
static Map<String, List<Pet>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
static Map<String, List<Pet>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final map = <String, List<Pet>>{};
|
final map = <String, List<Pet>>{};
|
||||||
if (json is Map && json.isNotEmpty) {
|
if (json is Map && json.isNotEmpty) {
|
||||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
for (final entry in json.entries) {
|
for (final entry in json.entries) {
|
||||||
final value = Pet.listFromJson(entry.value, growable: growable,);
|
map[entry.key] = Pet.listFromJson(entry.value, growable: growable,);
|
||||||
if (value != null) {
|
|
||||||
map[entry.key] = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
@ -198,7 +196,7 @@ class PetStatusEnum {
|
|||||||
|
|
||||||
static PetStatusEnum? fromJson(dynamic value) => PetStatusEnumTypeTransformer().decode(value);
|
static PetStatusEnum? fromJson(dynamic value) => PetStatusEnumTypeTransformer().decode(value);
|
||||||
|
|
||||||
static List<PetStatusEnum>? listFromJson(dynamic json, {bool growable = false,}) {
|
static List<PetStatusEnum> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final result = <PetStatusEnum>[];
|
final result = <PetStatusEnum>[];
|
||||||
if (json is List && json.isNotEmpty) {
|
if (json is List && json.isNotEmpty) {
|
||||||
for (final row in json) {
|
for (final row in json) {
|
||||||
|
@ -88,7 +88,7 @@ class Tag {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
static List<Tag>? listFromJson(dynamic json, {bool growable = false,}) {
|
static List<Tag> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final result = <Tag>[];
|
final result = <Tag>[];
|
||||||
if (json is List && json.isNotEmpty) {
|
if (json is List && json.isNotEmpty) {
|
||||||
for (final row in json) {
|
for (final row in json) {
|
||||||
@ -119,12 +119,10 @@ class Tag {
|
|||||||
static Map<String, List<Tag>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
static Map<String, List<Tag>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final map = <String, List<Tag>>{};
|
final map = <String, List<Tag>>{};
|
||||||
if (json is Map && json.isNotEmpty) {
|
if (json is Map && json.isNotEmpty) {
|
||||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
for (final entry in json.entries) {
|
for (final entry in json.entries) {
|
||||||
final value = Tag.listFromJson(entry.value, growable: growable,);
|
map[entry.key] = Tag.listFromJson(entry.value, growable: growable,);
|
||||||
if (value != null) {
|
|
||||||
map[entry.key] = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
|
@ -191,7 +191,7 @@ class User {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
static List<User>? listFromJson(dynamic json, {bool growable = false,}) {
|
static List<User> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final result = <User>[];
|
final result = <User>[];
|
||||||
if (json is List && json.isNotEmpty) {
|
if (json is List && json.isNotEmpty) {
|
||||||
for (final row in json) {
|
for (final row in json) {
|
||||||
@ -222,12 +222,10 @@ class User {
|
|||||||
static Map<String, List<User>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
static Map<String, List<User>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final map = <String, List<User>>{};
|
final map = <String, List<User>>{};
|
||||||
if (json is Map && json.isNotEmpty) {
|
if (json is Map && json.isNotEmpty) {
|
||||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
for (final entry in json.entries) {
|
for (final entry in json.entries) {
|
||||||
final value = User.listFromJson(entry.value, growable: growable,);
|
map[entry.key] = User.listFromJson(entry.value, growable: growable,);
|
||||||
if (value != null) {
|
|
||||||
map[entry.key] = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
|
@ -68,7 +68,7 @@ class AdditionalPropertiesClass {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
static List<AdditionalPropertiesClass>? listFromJson(dynamic json, {bool growable = false,}) {
|
static List<AdditionalPropertiesClass> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final result = <AdditionalPropertiesClass>[];
|
final result = <AdditionalPropertiesClass>[];
|
||||||
if (json is List && json.isNotEmpty) {
|
if (json is List && json.isNotEmpty) {
|
||||||
for (final row in json) {
|
for (final row in json) {
|
||||||
@ -99,12 +99,10 @@ class AdditionalPropertiesClass {
|
|||||||
static Map<String, List<AdditionalPropertiesClass>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
static Map<String, List<AdditionalPropertiesClass>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final map = <String, List<AdditionalPropertiesClass>>{};
|
final map = <String, List<AdditionalPropertiesClass>>{};
|
||||||
if (json is Map && json.isNotEmpty) {
|
if (json is Map && json.isNotEmpty) {
|
||||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
for (final entry in json.entries) {
|
for (final entry in json.entries) {
|
||||||
final value = AdditionalPropertiesClass.listFromJson(entry.value, growable: growable,);
|
map[entry.key] = AdditionalPropertiesClass.listFromJson(entry.value, growable: growable,);
|
||||||
if (value != null) {
|
|
||||||
map[entry.key] = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
|
@ -88,7 +88,7 @@ class AllOfWithSingleRef {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
static List<AllOfWithSingleRef>? listFromJson(dynamic json, {bool growable = false,}) {
|
static List<AllOfWithSingleRef> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final result = <AllOfWithSingleRef>[];
|
final result = <AllOfWithSingleRef>[];
|
||||||
if (json is List && json.isNotEmpty) {
|
if (json is List && json.isNotEmpty) {
|
||||||
for (final row in json) {
|
for (final row in json) {
|
||||||
@ -119,12 +119,10 @@ class AllOfWithSingleRef {
|
|||||||
static Map<String, List<AllOfWithSingleRef>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
static Map<String, List<AllOfWithSingleRef>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final map = <String, List<AllOfWithSingleRef>>{};
|
final map = <String, List<AllOfWithSingleRef>>{};
|
||||||
if (json is Map && json.isNotEmpty) {
|
if (json is Map && json.isNotEmpty) {
|
||||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
for (final entry in json.entries) {
|
for (final entry in json.entries) {
|
||||||
final value = AllOfWithSingleRef.listFromJson(entry.value, growable: growable,);
|
map[entry.key] = AllOfWithSingleRef.listFromJson(entry.value, growable: growable,);
|
||||||
if (value != null) {
|
|
||||||
map[entry.key] = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
|
@ -68,7 +68,7 @@ class Animal {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
static List<Animal>? listFromJson(dynamic json, {bool growable = false,}) {
|
static List<Animal> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final result = <Animal>[];
|
final result = <Animal>[];
|
||||||
if (json is List && json.isNotEmpty) {
|
if (json is List && json.isNotEmpty) {
|
||||||
for (final row in json) {
|
for (final row in json) {
|
||||||
@ -99,12 +99,10 @@ class Animal {
|
|||||||
static Map<String, List<Animal>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
static Map<String, List<Animal>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final map = <String, List<Animal>>{};
|
final map = <String, List<Animal>>{};
|
||||||
if (json is Map && json.isNotEmpty) {
|
if (json is Map && json.isNotEmpty) {
|
||||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
for (final entry in json.entries) {
|
for (final entry in json.entries) {
|
||||||
final value = Animal.listFromJson(entry.value, growable: growable,);
|
map[entry.key] = Animal.listFromJson(entry.value, growable: growable,);
|
||||||
if (value != null) {
|
|
||||||
map[entry.key] = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
|
@ -105,7 +105,7 @@ class ApiResponse {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
static List<ApiResponse>? listFromJson(dynamic json, {bool growable = false,}) {
|
static List<ApiResponse> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final result = <ApiResponse>[];
|
final result = <ApiResponse>[];
|
||||||
if (json is List && json.isNotEmpty) {
|
if (json is List && json.isNotEmpty) {
|
||||||
for (final row in json) {
|
for (final row in json) {
|
||||||
@ -136,12 +136,10 @@ class ApiResponse {
|
|||||||
static Map<String, List<ApiResponse>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
static Map<String, List<ApiResponse>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final map = <String, List<ApiResponse>>{};
|
final map = <String, List<ApiResponse>>{};
|
||||||
if (json is Map && json.isNotEmpty) {
|
if (json is Map && json.isNotEmpty) {
|
||||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
for (final entry in json.entries) {
|
for (final entry in json.entries) {
|
||||||
final value = ApiResponse.listFromJson(entry.value, growable: growable,);
|
map[entry.key] = ApiResponse.listFromJson(entry.value, growable: growable,);
|
||||||
if (value != null) {
|
|
||||||
map[entry.key] = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
|
@ -65,7 +65,7 @@ class ArrayOfArrayOfNumberOnly {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
static List<ArrayOfArrayOfNumberOnly>? listFromJson(dynamic json, {bool growable = false,}) {
|
static List<ArrayOfArrayOfNumberOnly> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final result = <ArrayOfArrayOfNumberOnly>[];
|
final result = <ArrayOfArrayOfNumberOnly>[];
|
||||||
if (json is List && json.isNotEmpty) {
|
if (json is List && json.isNotEmpty) {
|
||||||
for (final row in json) {
|
for (final row in json) {
|
||||||
@ -96,12 +96,10 @@ class ArrayOfArrayOfNumberOnly {
|
|||||||
static Map<String, List<ArrayOfArrayOfNumberOnly>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
static Map<String, List<ArrayOfArrayOfNumberOnly>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final map = <String, List<ArrayOfArrayOfNumberOnly>>{};
|
final map = <String, List<ArrayOfArrayOfNumberOnly>>{};
|
||||||
if (json is Map && json.isNotEmpty) {
|
if (json is Map && json.isNotEmpty) {
|
||||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
for (final entry in json.entries) {
|
for (final entry in json.entries) {
|
||||||
final value = ArrayOfArrayOfNumberOnly.listFromJson(entry.value, growable: growable,);
|
map[entry.key] = ArrayOfArrayOfNumberOnly.listFromJson(entry.value, growable: growable,);
|
||||||
if (value != null) {
|
|
||||||
map[entry.key] = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
|
@ -63,7 +63,7 @@ class ArrayOfNumberOnly {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
static List<ArrayOfNumberOnly>? listFromJson(dynamic json, {bool growable = false,}) {
|
static List<ArrayOfNumberOnly> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final result = <ArrayOfNumberOnly>[];
|
final result = <ArrayOfNumberOnly>[];
|
||||||
if (json is List && json.isNotEmpty) {
|
if (json is List && json.isNotEmpty) {
|
||||||
for (final row in json) {
|
for (final row in json) {
|
||||||
@ -94,12 +94,10 @@ class ArrayOfNumberOnly {
|
|||||||
static Map<String, List<ArrayOfNumberOnly>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
static Map<String, List<ArrayOfNumberOnly>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final map = <String, List<ArrayOfNumberOnly>>{};
|
final map = <String, List<ArrayOfNumberOnly>>{};
|
||||||
if (json is Map && json.isNotEmpty) {
|
if (json is Map && json.isNotEmpty) {
|
||||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
for (final entry in json.entries) {
|
for (final entry in json.entries) {
|
||||||
final value = ArrayOfNumberOnly.listFromJson(entry.value, growable: growable,);
|
map[entry.key] = ArrayOfNumberOnly.listFromJson(entry.value, growable: growable,);
|
||||||
if (value != null) {
|
|
||||||
map[entry.key] = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
|
@ -77,7 +77,7 @@ class ArrayTest {
|
|||||||
: const [],
|
: const [],
|
||||||
arrayArrayOfModel: json[r'array_array_of_model'] is List
|
arrayArrayOfModel: json[r'array_array_of_model'] is List
|
||||||
? (json[r'array_array_of_model'] as List).map((e) =>
|
? (json[r'array_array_of_model'] as List).map((e) =>
|
||||||
ReadOnlyFirst.listFromJson(json[r'array_array_of_model']) ?? const []
|
ReadOnlyFirst.listFromJson(json[r'array_array_of_model'])
|
||||||
).toList()
|
).toList()
|
||||||
: const [],
|
: const [],
|
||||||
);
|
);
|
||||||
@ -85,7 +85,7 @@ class ArrayTest {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
static List<ArrayTest>? listFromJson(dynamic json, {bool growable = false,}) {
|
static List<ArrayTest> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final result = <ArrayTest>[];
|
final result = <ArrayTest>[];
|
||||||
if (json is List && json.isNotEmpty) {
|
if (json is List && json.isNotEmpty) {
|
||||||
for (final row in json) {
|
for (final row in json) {
|
||||||
@ -116,12 +116,10 @@ class ArrayTest {
|
|||||||
static Map<String, List<ArrayTest>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
static Map<String, List<ArrayTest>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final map = <String, List<ArrayTest>>{};
|
final map = <String, List<ArrayTest>>{};
|
||||||
if (json is Map && json.isNotEmpty) {
|
if (json is Map && json.isNotEmpty) {
|
||||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
for (final entry in json.entries) {
|
for (final entry in json.entries) {
|
||||||
final value = ArrayTest.listFromJson(entry.value, growable: growable,);
|
map[entry.key] = ArrayTest.listFromJson(entry.value, growable: growable,);
|
||||||
if (value != null) {
|
|
||||||
map[entry.key] = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
|
@ -157,7 +157,7 @@ class Capitalization {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
static List<Capitalization>? listFromJson(dynamic json, {bool growable = false,}) {
|
static List<Capitalization> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final result = <Capitalization>[];
|
final result = <Capitalization>[];
|
||||||
if (json is List && json.isNotEmpty) {
|
if (json is List && json.isNotEmpty) {
|
||||||
for (final row in json) {
|
for (final row in json) {
|
||||||
@ -188,12 +188,10 @@ class Capitalization {
|
|||||||
static Map<String, List<Capitalization>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
static Map<String, List<Capitalization>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final map = <String, List<Capitalization>>{};
|
final map = <String, List<Capitalization>>{};
|
||||||
if (json is Map && json.isNotEmpty) {
|
if (json is Map && json.isNotEmpty) {
|
||||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
for (final entry in json.entries) {
|
for (final entry in json.entries) {
|
||||||
final value = Capitalization.listFromJson(entry.value, growable: growable,);
|
map[entry.key] = Capitalization.listFromJson(entry.value, growable: growable,);
|
||||||
if (value != null) {
|
|
||||||
map[entry.key] = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
|
@ -85,7 +85,7 @@ class Cat {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
static List<Cat>? listFromJson(dynamic json, {bool growable = false,}) {
|
static List<Cat> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final result = <Cat>[];
|
final result = <Cat>[];
|
||||||
if (json is List && json.isNotEmpty) {
|
if (json is List && json.isNotEmpty) {
|
||||||
for (final row in json) {
|
for (final row in json) {
|
||||||
@ -116,12 +116,10 @@ class Cat {
|
|||||||
static Map<String, List<Cat>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
static Map<String, List<Cat>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final map = <String, List<Cat>>{};
|
final map = <String, List<Cat>>{};
|
||||||
if (json is Map && json.isNotEmpty) {
|
if (json is Map && json.isNotEmpty) {
|
||||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
for (final entry in json.entries) {
|
for (final entry in json.entries) {
|
||||||
final value = Cat.listFromJson(entry.value, growable: growable,);
|
map[entry.key] = Cat.listFromJson(entry.value, growable: growable,);
|
||||||
if (value != null) {
|
|
||||||
map[entry.key] = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
|
@ -71,7 +71,7 @@ class CatAllOf {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
static List<CatAllOf>? listFromJson(dynamic json, {bool growable = false,}) {
|
static List<CatAllOf> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final result = <CatAllOf>[];
|
final result = <CatAllOf>[];
|
||||||
if (json is List && json.isNotEmpty) {
|
if (json is List && json.isNotEmpty) {
|
||||||
for (final row in json) {
|
for (final row in json) {
|
||||||
@ -102,12 +102,10 @@ class CatAllOf {
|
|||||||
static Map<String, List<CatAllOf>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
static Map<String, List<CatAllOf>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final map = <String, List<CatAllOf>>{};
|
final map = <String, List<CatAllOf>>{};
|
||||||
if (json is Map && json.isNotEmpty) {
|
if (json is Map && json.isNotEmpty) {
|
||||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
for (final entry in json.entries) {
|
for (final entry in json.entries) {
|
||||||
final value = CatAllOf.listFromJson(entry.value, growable: growable,);
|
map[entry.key] = CatAllOf.listFromJson(entry.value, growable: growable,);
|
||||||
if (value != null) {
|
|
||||||
map[entry.key] = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
|
@ -78,7 +78,7 @@ class Category {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
static List<Category>? listFromJson(dynamic json, {bool growable = false,}) {
|
static List<Category> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final result = <Category>[];
|
final result = <Category>[];
|
||||||
if (json is List && json.isNotEmpty) {
|
if (json is List && json.isNotEmpty) {
|
||||||
for (final row in json) {
|
for (final row in json) {
|
||||||
@ -109,12 +109,10 @@ class Category {
|
|||||||
static Map<String, List<Category>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
static Map<String, List<Category>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final map = <String, List<Category>>{};
|
final map = <String, List<Category>>{};
|
||||||
if (json is Map && json.isNotEmpty) {
|
if (json is Map && json.isNotEmpty) {
|
||||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
for (final entry in json.entries) {
|
for (final entry in json.entries) {
|
||||||
final value = Category.listFromJson(entry.value, growable: growable,);
|
map[entry.key] = Category.listFromJson(entry.value, growable: growable,);
|
||||||
if (value != null) {
|
|
||||||
map[entry.key] = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
|
@ -71,7 +71,7 @@ class ClassModel {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
static List<ClassModel>? listFromJson(dynamic json, {bool growable = false,}) {
|
static List<ClassModel> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final result = <ClassModel>[];
|
final result = <ClassModel>[];
|
||||||
if (json is List && json.isNotEmpty) {
|
if (json is List && json.isNotEmpty) {
|
||||||
for (final row in json) {
|
for (final row in json) {
|
||||||
@ -102,12 +102,10 @@ class ClassModel {
|
|||||||
static Map<String, List<ClassModel>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
static Map<String, List<ClassModel>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final map = <String, List<ClassModel>>{};
|
final map = <String, List<ClassModel>>{};
|
||||||
if (json is Map && json.isNotEmpty) {
|
if (json is Map && json.isNotEmpty) {
|
||||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
for (final entry in json.entries) {
|
for (final entry in json.entries) {
|
||||||
final value = ClassModel.listFromJson(entry.value, growable: growable,);
|
map[entry.key] = ClassModel.listFromJson(entry.value, growable: growable,);
|
||||||
if (value != null) {
|
|
||||||
map[entry.key] = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
|
@ -71,7 +71,7 @@ class DeprecatedObject {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
static List<DeprecatedObject>? listFromJson(dynamic json, {bool growable = false,}) {
|
static List<DeprecatedObject> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final result = <DeprecatedObject>[];
|
final result = <DeprecatedObject>[];
|
||||||
if (json is List && json.isNotEmpty) {
|
if (json is List && json.isNotEmpty) {
|
||||||
for (final row in json) {
|
for (final row in json) {
|
||||||
@ -102,12 +102,10 @@ class DeprecatedObject {
|
|||||||
static Map<String, List<DeprecatedObject>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
static Map<String, List<DeprecatedObject>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final map = <String, List<DeprecatedObject>>{};
|
final map = <String, List<DeprecatedObject>>{};
|
||||||
if (json is Map && json.isNotEmpty) {
|
if (json is Map && json.isNotEmpty) {
|
||||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
for (final entry in json.entries) {
|
for (final entry in json.entries) {
|
||||||
final value = DeprecatedObject.listFromJson(entry.value, growable: growable,);
|
map[entry.key] = DeprecatedObject.listFromJson(entry.value, growable: growable,);
|
||||||
if (value != null) {
|
|
||||||
map[entry.key] = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
|
@ -85,7 +85,7 @@ class Dog {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
static List<Dog>? listFromJson(dynamic json, {bool growable = false,}) {
|
static List<Dog> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final result = <Dog>[];
|
final result = <Dog>[];
|
||||||
if (json is List && json.isNotEmpty) {
|
if (json is List && json.isNotEmpty) {
|
||||||
for (final row in json) {
|
for (final row in json) {
|
||||||
@ -116,12 +116,10 @@ class Dog {
|
|||||||
static Map<String, List<Dog>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
static Map<String, List<Dog>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final map = <String, List<Dog>>{};
|
final map = <String, List<Dog>>{};
|
||||||
if (json is Map && json.isNotEmpty) {
|
if (json is Map && json.isNotEmpty) {
|
||||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
for (final entry in json.entries) {
|
for (final entry in json.entries) {
|
||||||
final value = Dog.listFromJson(entry.value, growable: growable,);
|
map[entry.key] = Dog.listFromJson(entry.value, growable: growable,);
|
||||||
if (value != null) {
|
|
||||||
map[entry.key] = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
|
@ -71,7 +71,7 @@ class DogAllOf {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
static List<DogAllOf>? listFromJson(dynamic json, {bool growable = false,}) {
|
static List<DogAllOf> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final result = <DogAllOf>[];
|
final result = <DogAllOf>[];
|
||||||
if (json is List && json.isNotEmpty) {
|
if (json is List && json.isNotEmpty) {
|
||||||
for (final row in json) {
|
for (final row in json) {
|
||||||
@ -102,12 +102,10 @@ class DogAllOf {
|
|||||||
static Map<String, List<DogAllOf>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
static Map<String, List<DogAllOf>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final map = <String, List<DogAllOf>>{};
|
final map = <String, List<DogAllOf>>{};
|
||||||
if (json is Map && json.isNotEmpty) {
|
if (json is Map && json.isNotEmpty) {
|
||||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
for (final entry in json.entries) {
|
for (final entry in json.entries) {
|
||||||
final value = DogAllOf.listFromJson(entry.value, growable: growable,);
|
map[entry.key] = DogAllOf.listFromJson(entry.value, growable: growable,);
|
||||||
if (value != null) {
|
|
||||||
map[entry.key] = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
|
@ -66,13 +66,13 @@ class EnumArrays {
|
|||||||
|
|
||||||
return EnumArrays(
|
return EnumArrays(
|
||||||
justSymbol: EnumArraysJustSymbolEnum.fromJson(json[r'just_symbol']),
|
justSymbol: EnumArraysJustSymbolEnum.fromJson(json[r'just_symbol']),
|
||||||
arrayEnum: EnumArraysArrayEnumEnum.listFromJson(json[r'array_enum']) ?? const [],
|
arrayEnum: EnumArraysArrayEnumEnum.listFromJson(json[r'array_enum']),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
static List<EnumArrays>? listFromJson(dynamic json, {bool growable = false,}) {
|
static List<EnumArrays> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final result = <EnumArrays>[];
|
final result = <EnumArrays>[];
|
||||||
if (json is List && json.isNotEmpty) {
|
if (json is List && json.isNotEmpty) {
|
||||||
for (final row in json) {
|
for (final row in json) {
|
||||||
@ -103,12 +103,10 @@ class EnumArrays {
|
|||||||
static Map<String, List<EnumArrays>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
static Map<String, List<EnumArrays>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final map = <String, List<EnumArrays>>{};
|
final map = <String, List<EnumArrays>>{};
|
||||||
if (json is Map && json.isNotEmpty) {
|
if (json is Map && json.isNotEmpty) {
|
||||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
for (final entry in json.entries) {
|
for (final entry in json.entries) {
|
||||||
final value = EnumArrays.listFromJson(entry.value, growable: growable,);
|
map[entry.key] = EnumArrays.listFromJson(entry.value, growable: growable,);
|
||||||
if (value != null) {
|
|
||||||
map[entry.key] = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
@ -143,7 +141,7 @@ class EnumArraysJustSymbolEnum {
|
|||||||
|
|
||||||
static EnumArraysJustSymbolEnum? fromJson(dynamic value) => EnumArraysJustSymbolEnumTypeTransformer().decode(value);
|
static EnumArraysJustSymbolEnum? fromJson(dynamic value) => EnumArraysJustSymbolEnumTypeTransformer().decode(value);
|
||||||
|
|
||||||
static List<EnumArraysJustSymbolEnum>? listFromJson(dynamic json, {bool growable = false,}) {
|
static List<EnumArraysJustSymbolEnum> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final result = <EnumArraysJustSymbolEnum>[];
|
final result = <EnumArraysJustSymbolEnum>[];
|
||||||
if (json is List && json.isNotEmpty) {
|
if (json is List && json.isNotEmpty) {
|
||||||
for (final row in json) {
|
for (final row in json) {
|
||||||
@ -217,7 +215,7 @@ class EnumArraysArrayEnumEnum {
|
|||||||
|
|
||||||
static EnumArraysArrayEnumEnum? fromJson(dynamic value) => EnumArraysArrayEnumEnumTypeTransformer().decode(value);
|
static EnumArraysArrayEnumEnum? fromJson(dynamic value) => EnumArraysArrayEnumEnumTypeTransformer().decode(value);
|
||||||
|
|
||||||
static List<EnumArraysArrayEnumEnum>? listFromJson(dynamic json, {bool growable = false,}) {
|
static List<EnumArraysArrayEnumEnum> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final result = <EnumArraysArrayEnumEnum>[];
|
final result = <EnumArraysArrayEnumEnum>[];
|
||||||
if (json is List && json.isNotEmpty) {
|
if (json is List && json.isNotEmpty) {
|
||||||
for (final row in json) {
|
for (final row in json) {
|
||||||
|
@ -36,7 +36,7 @@ class EnumClass {
|
|||||||
|
|
||||||
static EnumClass? fromJson(dynamic value) => EnumClassTypeTransformer().decode(value);
|
static EnumClass? fromJson(dynamic value) => EnumClassTypeTransformer().decode(value);
|
||||||
|
|
||||||
static List<EnumClass>? listFromJson(dynamic json, {bool growable = false,}) {
|
static List<EnumClass> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final result = <EnumClass>[];
|
final result = <EnumClass>[];
|
||||||
if (json is List && json.isNotEmpty) {
|
if (json is List && json.isNotEmpty) {
|
||||||
for (final row in json) {
|
for (final row in json) {
|
||||||
|
@ -156,7 +156,7 @@ class EnumTest {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
static List<EnumTest>? listFromJson(dynamic json, {bool growable = false,}) {
|
static List<EnumTest> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final result = <EnumTest>[];
|
final result = <EnumTest>[];
|
||||||
if (json is List && json.isNotEmpty) {
|
if (json is List && json.isNotEmpty) {
|
||||||
for (final row in json) {
|
for (final row in json) {
|
||||||
@ -187,12 +187,10 @@ class EnumTest {
|
|||||||
static Map<String, List<EnumTest>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
static Map<String, List<EnumTest>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final map = <String, List<EnumTest>>{};
|
final map = <String, List<EnumTest>>{};
|
||||||
if (json is Map && json.isNotEmpty) {
|
if (json is Map && json.isNotEmpty) {
|
||||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
for (final entry in json.entries) {
|
for (final entry in json.entries) {
|
||||||
final value = EnumTest.listFromJson(entry.value, growable: growable,);
|
map[entry.key] = EnumTest.listFromJson(entry.value, growable: growable,);
|
||||||
if (value != null) {
|
|
||||||
map[entry.key] = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
@ -230,7 +228,7 @@ class EnumTestEnumStringEnum {
|
|||||||
|
|
||||||
static EnumTestEnumStringEnum? fromJson(dynamic value) => EnumTestEnumStringEnumTypeTransformer().decode(value);
|
static EnumTestEnumStringEnum? fromJson(dynamic value) => EnumTestEnumStringEnumTypeTransformer().decode(value);
|
||||||
|
|
||||||
static List<EnumTestEnumStringEnum>? listFromJson(dynamic json, {bool growable = false,}) {
|
static List<EnumTestEnumStringEnum> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final result = <EnumTestEnumStringEnum>[];
|
final result = <EnumTestEnumStringEnum>[];
|
||||||
if (json is List && json.isNotEmpty) {
|
if (json is List && json.isNotEmpty) {
|
||||||
for (final row in json) {
|
for (final row in json) {
|
||||||
@ -307,7 +305,7 @@ class EnumTestEnumStringRequiredEnum {
|
|||||||
|
|
||||||
static EnumTestEnumStringRequiredEnum? fromJson(dynamic value) => EnumTestEnumStringRequiredEnumTypeTransformer().decode(value);
|
static EnumTestEnumStringRequiredEnum? fromJson(dynamic value) => EnumTestEnumStringRequiredEnumTypeTransformer().decode(value);
|
||||||
|
|
||||||
static List<EnumTestEnumStringRequiredEnum>? listFromJson(dynamic json, {bool growable = false,}) {
|
static List<EnumTestEnumStringRequiredEnum> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final result = <EnumTestEnumStringRequiredEnum>[];
|
final result = <EnumTestEnumStringRequiredEnum>[];
|
||||||
if (json is List && json.isNotEmpty) {
|
if (json is List && json.isNotEmpty) {
|
||||||
for (final row in json) {
|
for (final row in json) {
|
||||||
@ -382,7 +380,7 @@ class EnumTestEnumIntegerEnum {
|
|||||||
|
|
||||||
static EnumTestEnumIntegerEnum? fromJson(dynamic value) => EnumTestEnumIntegerEnumTypeTransformer().decode(value);
|
static EnumTestEnumIntegerEnum? fromJson(dynamic value) => EnumTestEnumIntegerEnumTypeTransformer().decode(value);
|
||||||
|
|
||||||
static List<EnumTestEnumIntegerEnum>? listFromJson(dynamic json, {bool growable = false,}) {
|
static List<EnumTestEnumIntegerEnum> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final result = <EnumTestEnumIntegerEnum>[];
|
final result = <EnumTestEnumIntegerEnum>[];
|
||||||
if (json is List && json.isNotEmpty) {
|
if (json is List && json.isNotEmpty) {
|
||||||
for (final row in json) {
|
for (final row in json) {
|
||||||
@ -456,7 +454,7 @@ class EnumTestEnumNumberEnum {
|
|||||||
|
|
||||||
static EnumTestEnumNumberEnum? fromJson(dynamic value) => EnumTestEnumNumberEnumTypeTransformer().decode(value);
|
static EnumTestEnumNumberEnum? fromJson(dynamic value) => EnumTestEnumNumberEnumTypeTransformer().decode(value);
|
||||||
|
|
||||||
static List<EnumTestEnumNumberEnum>? listFromJson(dynamic json, {bool growable = false,}) {
|
static List<EnumTestEnumNumberEnum> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final result = <EnumTestEnumNumberEnum>[];
|
final result = <EnumTestEnumNumberEnum>[];
|
||||||
if (json is List && json.isNotEmpty) {
|
if (json is List && json.isNotEmpty) {
|
||||||
for (final row in json) {
|
for (final row in json) {
|
||||||
|
@ -72,13 +72,13 @@ class FileSchemaTestClass {
|
|||||||
|
|
||||||
return FileSchemaTestClass(
|
return FileSchemaTestClass(
|
||||||
file: ModelFile.fromJson(json[r'file']),
|
file: ModelFile.fromJson(json[r'file']),
|
||||||
files: ModelFile.listFromJson(json[r'files']) ?? const [],
|
files: ModelFile.listFromJson(json[r'files']),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
static List<FileSchemaTestClass>? listFromJson(dynamic json, {bool growable = false,}) {
|
static List<FileSchemaTestClass> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final result = <FileSchemaTestClass>[];
|
final result = <FileSchemaTestClass>[];
|
||||||
if (json is List && json.isNotEmpty) {
|
if (json is List && json.isNotEmpty) {
|
||||||
for (final row in json) {
|
for (final row in json) {
|
||||||
@ -109,12 +109,10 @@ class FileSchemaTestClass {
|
|||||||
static Map<String, List<FileSchemaTestClass>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
static Map<String, List<FileSchemaTestClass>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final map = <String, List<FileSchemaTestClass>>{};
|
final map = <String, List<FileSchemaTestClass>>{};
|
||||||
if (json is Map && json.isNotEmpty) {
|
if (json is Map && json.isNotEmpty) {
|
||||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
for (final entry in json.entries) {
|
for (final entry in json.entries) {
|
||||||
final value = FileSchemaTestClass.listFromJson(entry.value, growable: growable,);
|
map[entry.key] = FileSchemaTestClass.listFromJson(entry.value, growable: growable,);
|
||||||
if (value != null) {
|
|
||||||
map[entry.key] = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
|
@ -61,7 +61,7 @@ class Foo {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
static List<Foo>? listFromJson(dynamic json, {bool growable = false,}) {
|
static List<Foo> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final result = <Foo>[];
|
final result = <Foo>[];
|
||||||
if (json is List && json.isNotEmpty) {
|
if (json is List && json.isNotEmpty) {
|
||||||
for (final row in json) {
|
for (final row in json) {
|
||||||
@ -92,12 +92,10 @@ class Foo {
|
|||||||
static Map<String, List<Foo>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
static Map<String, List<Foo>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final map = <String, List<Foo>>{};
|
final map = <String, List<Foo>>{};
|
||||||
if (json is Map && json.isNotEmpty) {
|
if (json is Map && json.isNotEmpty) {
|
||||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
for (final entry in json.entries) {
|
for (final entry in json.entries) {
|
||||||
final value = Foo.listFromJson(entry.value, growable: growable,);
|
map[entry.key] = Foo.listFromJson(entry.value, growable: growable,);
|
||||||
if (value != null) {
|
|
||||||
map[entry.key] = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
|
@ -71,7 +71,7 @@ class FooGetDefaultResponse {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
static List<FooGetDefaultResponse>? listFromJson(dynamic json, {bool growable = false,}) {
|
static List<FooGetDefaultResponse> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final result = <FooGetDefaultResponse>[];
|
final result = <FooGetDefaultResponse>[];
|
||||||
if (json is List && json.isNotEmpty) {
|
if (json is List && json.isNotEmpty) {
|
||||||
for (final row in json) {
|
for (final row in json) {
|
||||||
@ -102,12 +102,10 @@ class FooGetDefaultResponse {
|
|||||||
static Map<String, List<FooGetDefaultResponse>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
static Map<String, List<FooGetDefaultResponse>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final map = <String, List<FooGetDefaultResponse>>{};
|
final map = <String, List<FooGetDefaultResponse>>{};
|
||||||
if (json is Map && json.isNotEmpty) {
|
if (json is Map && json.isNotEmpty) {
|
||||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
for (final entry in json.entries) {
|
for (final entry in json.entries) {
|
||||||
final value = FooGetDefaultResponse.listFromJson(entry.value, growable: growable,);
|
map[entry.key] = FooGetDefaultResponse.listFromJson(entry.value, growable: growable,);
|
||||||
if (value != null) {
|
|
||||||
map[entry.key] = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
|
@ -300,7 +300,7 @@ class FormatTest {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
static List<FormatTest>? listFromJson(dynamic json, {bool growable = false,}) {
|
static List<FormatTest> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final result = <FormatTest>[];
|
final result = <FormatTest>[];
|
||||||
if (json is List && json.isNotEmpty) {
|
if (json is List && json.isNotEmpty) {
|
||||||
for (final row in json) {
|
for (final row in json) {
|
||||||
@ -331,12 +331,10 @@ class FormatTest {
|
|||||||
static Map<String, List<FormatTest>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
static Map<String, List<FormatTest>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final map = <String, List<FormatTest>>{};
|
final map = <String, List<FormatTest>>{};
|
||||||
if (json is Map && json.isNotEmpty) {
|
if (json is Map && json.isNotEmpty) {
|
||||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
for (final entry in json.entries) {
|
for (final entry in json.entries) {
|
||||||
final value = FormatTest.listFromJson(entry.value, growable: growable,);
|
map[entry.key] = FormatTest.listFromJson(entry.value, growable: growable,);
|
||||||
if (value != null) {
|
|
||||||
map[entry.key] = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
|
@ -88,7 +88,7 @@ class HasOnlyReadOnly {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
static List<HasOnlyReadOnly>? listFromJson(dynamic json, {bool growable = false,}) {
|
static List<HasOnlyReadOnly> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final result = <HasOnlyReadOnly>[];
|
final result = <HasOnlyReadOnly>[];
|
||||||
if (json is List && json.isNotEmpty) {
|
if (json is List && json.isNotEmpty) {
|
||||||
for (final row in json) {
|
for (final row in json) {
|
||||||
@ -119,12 +119,10 @@ class HasOnlyReadOnly {
|
|||||||
static Map<String, List<HasOnlyReadOnly>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
static Map<String, List<HasOnlyReadOnly>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final map = <String, List<HasOnlyReadOnly>>{};
|
final map = <String, List<HasOnlyReadOnly>>{};
|
||||||
if (json is Map && json.isNotEmpty) {
|
if (json is Map && json.isNotEmpty) {
|
||||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
for (final entry in json.entries) {
|
for (final entry in json.entries) {
|
||||||
final value = HasOnlyReadOnly.listFromJson(entry.value, growable: growable,);
|
map[entry.key] = HasOnlyReadOnly.listFromJson(entry.value, growable: growable,);
|
||||||
if (value != null) {
|
|
||||||
map[entry.key] = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
|
@ -65,7 +65,7 @@ class HealthCheckResult {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
static List<HealthCheckResult>? listFromJson(dynamic json, {bool growable = false,}) {
|
static List<HealthCheckResult> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final result = <HealthCheckResult>[];
|
final result = <HealthCheckResult>[];
|
||||||
if (json is List && json.isNotEmpty) {
|
if (json is List && json.isNotEmpty) {
|
||||||
for (final row in json) {
|
for (final row in json) {
|
||||||
@ -96,12 +96,10 @@ class HealthCheckResult {
|
|||||||
static Map<String, List<HealthCheckResult>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
static Map<String, List<HealthCheckResult>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final map = <String, List<HealthCheckResult>>{};
|
final map = <String, List<HealthCheckResult>>{};
|
||||||
if (json is Map && json.isNotEmpty) {
|
if (json is Map && json.isNotEmpty) {
|
||||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
for (final entry in json.entries) {
|
for (final entry in json.entries) {
|
||||||
final value = HealthCheckResult.listFromJson(entry.value, growable: growable,);
|
map[entry.key] = HealthCheckResult.listFromJson(entry.value, growable: growable,);
|
||||||
if (value != null) {
|
|
||||||
map[entry.key] = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
|
@ -82,7 +82,7 @@ class MapTest {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
static List<MapTest>? listFromJson(dynamic json, {bool growable = false,}) {
|
static List<MapTest> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final result = <MapTest>[];
|
final result = <MapTest>[];
|
||||||
if (json is List && json.isNotEmpty) {
|
if (json is List && json.isNotEmpty) {
|
||||||
for (final row in json) {
|
for (final row in json) {
|
||||||
@ -113,12 +113,10 @@ class MapTest {
|
|||||||
static Map<String, List<MapTest>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
static Map<String, List<MapTest>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final map = <String, List<MapTest>>{};
|
final map = <String, List<MapTest>>{};
|
||||||
if (json is Map && json.isNotEmpty) {
|
if (json is Map && json.isNotEmpty) {
|
||||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
for (final entry in json.entries) {
|
for (final entry in json.entries) {
|
||||||
final value = MapTest.listFromJson(entry.value, growable: growable,);
|
map[entry.key] = MapTest.listFromJson(entry.value, growable: growable,);
|
||||||
if (value != null) {
|
|
||||||
map[entry.key] = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
@ -153,7 +151,7 @@ class MapTestMapOfEnumStringEnum {
|
|||||||
|
|
||||||
static MapTestMapOfEnumStringEnum? fromJson(dynamic value) => MapTestMapOfEnumStringEnumTypeTransformer().decode(value);
|
static MapTestMapOfEnumStringEnum? fromJson(dynamic value) => MapTestMapOfEnumStringEnumTypeTransformer().decode(value);
|
||||||
|
|
||||||
static List<MapTestMapOfEnumStringEnum>? listFromJson(dynamic json, {bool growable = false,}) {
|
static List<MapTestMapOfEnumStringEnum> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final result = <MapTestMapOfEnumStringEnum>[];
|
final result = <MapTestMapOfEnumStringEnum>[];
|
||||||
if (json is List && json.isNotEmpty) {
|
if (json is List && json.isNotEmpty) {
|
||||||
for (final row in json) {
|
for (final row in json) {
|
||||||
|
@ -89,13 +89,13 @@ class MixedPropertiesAndAdditionalPropertiesClass {
|
|||||||
return MixedPropertiesAndAdditionalPropertiesClass(
|
return MixedPropertiesAndAdditionalPropertiesClass(
|
||||||
uuid: mapValueOfType<String>(json, r'uuid'),
|
uuid: mapValueOfType<String>(json, r'uuid'),
|
||||||
dateTime: mapDateTime(json, r'dateTime', ''),
|
dateTime: mapDateTime(json, r'dateTime', ''),
|
||||||
map: Animal.mapFromJson(json[r'map']) ?? const {},
|
map: Animal.mapFromJson(json[r'map']),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
static List<MixedPropertiesAndAdditionalPropertiesClass>? listFromJson(dynamic json, {bool growable = false,}) {
|
static List<MixedPropertiesAndAdditionalPropertiesClass> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final result = <MixedPropertiesAndAdditionalPropertiesClass>[];
|
final result = <MixedPropertiesAndAdditionalPropertiesClass>[];
|
||||||
if (json is List && json.isNotEmpty) {
|
if (json is List && json.isNotEmpty) {
|
||||||
for (final row in json) {
|
for (final row in json) {
|
||||||
@ -126,12 +126,10 @@ class MixedPropertiesAndAdditionalPropertiesClass {
|
|||||||
static Map<String, List<MixedPropertiesAndAdditionalPropertiesClass>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
static Map<String, List<MixedPropertiesAndAdditionalPropertiesClass>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final map = <String, List<MixedPropertiesAndAdditionalPropertiesClass>>{};
|
final map = <String, List<MixedPropertiesAndAdditionalPropertiesClass>>{};
|
||||||
if (json is Map && json.isNotEmpty) {
|
if (json is Map && json.isNotEmpty) {
|
||||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
for (final entry in json.entries) {
|
for (final entry in json.entries) {
|
||||||
final value = MixedPropertiesAndAdditionalPropertiesClass.listFromJson(entry.value, growable: growable,);
|
map[entry.key] = MixedPropertiesAndAdditionalPropertiesClass.listFromJson(entry.value, growable: growable,);
|
||||||
if (value != null) {
|
|
||||||
map[entry.key] = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
|
@ -88,7 +88,7 @@ class Model200Response {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
static List<Model200Response>? listFromJson(dynamic json, {bool growable = false,}) {
|
static List<Model200Response> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final result = <Model200Response>[];
|
final result = <Model200Response>[];
|
||||||
if (json is List && json.isNotEmpty) {
|
if (json is List && json.isNotEmpty) {
|
||||||
for (final row in json) {
|
for (final row in json) {
|
||||||
@ -119,12 +119,10 @@ class Model200Response {
|
|||||||
static Map<String, List<Model200Response>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
static Map<String, List<Model200Response>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final map = <String, List<Model200Response>>{};
|
final map = <String, List<Model200Response>>{};
|
||||||
if (json is Map && json.isNotEmpty) {
|
if (json is Map && json.isNotEmpty) {
|
||||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
for (final entry in json.entries) {
|
for (final entry in json.entries) {
|
||||||
final value = Model200Response.listFromJson(entry.value, growable: growable,);
|
map[entry.key] = Model200Response.listFromJson(entry.value, growable: growable,);
|
||||||
if (value != null) {
|
|
||||||
map[entry.key] = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
|
@ -71,7 +71,7 @@ class ModelClient {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
static List<ModelClient>? listFromJson(dynamic json, {bool growable = false,}) {
|
static List<ModelClient> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final result = <ModelClient>[];
|
final result = <ModelClient>[];
|
||||||
if (json is List && json.isNotEmpty) {
|
if (json is List && json.isNotEmpty) {
|
||||||
for (final row in json) {
|
for (final row in json) {
|
||||||
@ -102,12 +102,10 @@ class ModelClient {
|
|||||||
static Map<String, List<ModelClient>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
static Map<String, List<ModelClient>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final map = <String, List<ModelClient>>{};
|
final map = <String, List<ModelClient>>{};
|
||||||
if (json is Map && json.isNotEmpty) {
|
if (json is Map && json.isNotEmpty) {
|
||||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
for (final entry in json.entries) {
|
for (final entry in json.entries) {
|
||||||
final value = ModelClient.listFromJson(entry.value, growable: growable,);
|
map[entry.key] = ModelClient.listFromJson(entry.value, growable: growable,);
|
||||||
if (value != null) {
|
|
||||||
map[entry.key] = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
|
@ -72,7 +72,7 @@ class ModelFile {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
static List<ModelFile>? listFromJson(dynamic json, {bool growable = false,}) {
|
static List<ModelFile> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final result = <ModelFile>[];
|
final result = <ModelFile>[];
|
||||||
if (json is List && json.isNotEmpty) {
|
if (json is List && json.isNotEmpty) {
|
||||||
for (final row in json) {
|
for (final row in json) {
|
||||||
@ -103,12 +103,10 @@ class ModelFile {
|
|||||||
static Map<String, List<ModelFile>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
static Map<String, List<ModelFile>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final map = <String, List<ModelFile>>{};
|
final map = <String, List<ModelFile>>{};
|
||||||
if (json is Map && json.isNotEmpty) {
|
if (json is Map && json.isNotEmpty) {
|
||||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
for (final entry in json.entries) {
|
for (final entry in json.entries) {
|
||||||
final value = ModelFile.listFromJson(entry.value, growable: growable,);
|
map[entry.key] = ModelFile.listFromJson(entry.value, growable: growable,);
|
||||||
if (value != null) {
|
|
||||||
map[entry.key] = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
|
@ -71,7 +71,7 @@ class ModelList {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
static List<ModelList>? listFromJson(dynamic json, {bool growable = false,}) {
|
static List<ModelList> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final result = <ModelList>[];
|
final result = <ModelList>[];
|
||||||
if (json is List && json.isNotEmpty) {
|
if (json is List && json.isNotEmpty) {
|
||||||
for (final row in json) {
|
for (final row in json) {
|
||||||
@ -102,12 +102,10 @@ class ModelList {
|
|||||||
static Map<String, List<ModelList>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
static Map<String, List<ModelList>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final map = <String, List<ModelList>>{};
|
final map = <String, List<ModelList>>{};
|
||||||
if (json is Map && json.isNotEmpty) {
|
if (json is Map && json.isNotEmpty) {
|
||||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
for (final entry in json.entries) {
|
for (final entry in json.entries) {
|
||||||
final value = ModelList.listFromJson(entry.value, growable: growable,);
|
map[entry.key] = ModelList.listFromJson(entry.value, growable: growable,);
|
||||||
if (value != null) {
|
|
||||||
map[entry.key] = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
|
@ -71,7 +71,7 @@ class ModelReturn {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
static List<ModelReturn>? listFromJson(dynamic json, {bool growable = false,}) {
|
static List<ModelReturn> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final result = <ModelReturn>[];
|
final result = <ModelReturn>[];
|
||||||
if (json is List && json.isNotEmpty) {
|
if (json is List && json.isNotEmpty) {
|
||||||
for (final row in json) {
|
for (final row in json) {
|
||||||
@ -102,12 +102,10 @@ class ModelReturn {
|
|||||||
static Map<String, List<ModelReturn>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
static Map<String, List<ModelReturn>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final map = <String, List<ModelReturn>>{};
|
final map = <String, List<ModelReturn>>{};
|
||||||
if (json is Map && json.isNotEmpty) {
|
if (json is Map && json.isNotEmpty) {
|
||||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
for (final entry in json.entries) {
|
for (final entry in json.entries) {
|
||||||
final value = ModelReturn.listFromJson(entry.value, growable: growable,);
|
map[entry.key] = ModelReturn.listFromJson(entry.value, growable: growable,);
|
||||||
if (value != null) {
|
|
||||||
map[entry.key] = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
|
@ -112,7 +112,7 @@ class Name {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
static List<Name>? listFromJson(dynamic json, {bool growable = false,}) {
|
static List<Name> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final result = <Name>[];
|
final result = <Name>[];
|
||||||
if (json is List && json.isNotEmpty) {
|
if (json is List && json.isNotEmpty) {
|
||||||
for (final row in json) {
|
for (final row in json) {
|
||||||
@ -143,12 +143,10 @@ class Name {
|
|||||||
static Map<String, List<Name>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
static Map<String, List<Name>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final map = <String, List<Name>>{};
|
final map = <String, List<Name>>{};
|
||||||
if (json is Map && json.isNotEmpty) {
|
if (json is Map && json.isNotEmpty) {
|
||||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
for (final entry in json.entries) {
|
for (final entry in json.entries) {
|
||||||
final value = Name.listFromJson(entry.value, growable: growable,);
|
map[entry.key] = Name.listFromJson(entry.value, growable: growable,);
|
||||||
if (value != null) {
|
|
||||||
map[entry.key] = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
|
@ -169,9 +169,9 @@ class NullableClass {
|
|||||||
stringProp: mapValueOfType<String>(json, r'string_prop'),
|
stringProp: mapValueOfType<String>(json, r'string_prop'),
|
||||||
dateProp: mapDateTime(json, r'date_prop', ''),
|
dateProp: mapDateTime(json, r'date_prop', ''),
|
||||||
datetimeProp: mapDateTime(json, r'datetime_prop', ''),
|
datetimeProp: mapDateTime(json, r'datetime_prop', ''),
|
||||||
arrayNullableProp: Object.listFromJson(json[r'array_nullable_prop']) ?? const [],
|
arrayNullableProp: Object.listFromJson(json[r'array_nullable_prop']),
|
||||||
arrayAndItemsNullableProp: Object.listFromJson(json[r'array_and_items_nullable_prop']) ?? const [],
|
arrayAndItemsNullableProp: Object.listFromJson(json[r'array_and_items_nullable_prop']),
|
||||||
arrayItemsNullable: Object.listFromJson(json[r'array_items_nullable']) ?? const [],
|
arrayItemsNullable: Object.listFromJson(json[r'array_items_nullable']),
|
||||||
objectNullableProp: mapCastOfType<String, Object>(json, r'object_nullable_prop') ?? const {},
|
objectNullableProp: mapCastOfType<String, Object>(json, r'object_nullable_prop') ?? const {},
|
||||||
objectAndItemsNullableProp: mapCastOfType<String, Object>(json, r'object_and_items_nullable_prop') ?? const {},
|
objectAndItemsNullableProp: mapCastOfType<String, Object>(json, r'object_and_items_nullable_prop') ?? const {},
|
||||||
objectItemsNullable: mapCastOfType<String, Object>(json, r'object_items_nullable') ?? const {},
|
objectItemsNullable: mapCastOfType<String, Object>(json, r'object_items_nullable') ?? const {},
|
||||||
@ -180,7 +180,7 @@ class NullableClass {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
static List<NullableClass>? listFromJson(dynamic json, {bool growable = false,}) {
|
static List<NullableClass> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final result = <NullableClass>[];
|
final result = <NullableClass>[];
|
||||||
if (json is List && json.isNotEmpty) {
|
if (json is List && json.isNotEmpty) {
|
||||||
for (final row in json) {
|
for (final row in json) {
|
||||||
@ -211,12 +211,10 @@ class NullableClass {
|
|||||||
static Map<String, List<NullableClass>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
static Map<String, List<NullableClass>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final map = <String, List<NullableClass>>{};
|
final map = <String, List<NullableClass>>{};
|
||||||
if (json is Map && json.isNotEmpty) {
|
if (json is Map && json.isNotEmpty) {
|
||||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
for (final entry in json.entries) {
|
for (final entry in json.entries) {
|
||||||
final value = NullableClass.listFromJson(entry.value, growable: growable,);
|
map[entry.key] = NullableClass.listFromJson(entry.value, growable: growable,);
|
||||||
if (value != null) {
|
|
||||||
map[entry.key] = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
|
@ -73,7 +73,7 @@ class NumberOnly {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
static List<NumberOnly>? listFromJson(dynamic json, {bool growable = false,}) {
|
static List<NumberOnly> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final result = <NumberOnly>[];
|
final result = <NumberOnly>[];
|
||||||
if (json is List && json.isNotEmpty) {
|
if (json is List && json.isNotEmpty) {
|
||||||
for (final row in json) {
|
for (final row in json) {
|
||||||
@ -104,12 +104,10 @@ class NumberOnly {
|
|||||||
static Map<String, List<NumberOnly>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
static Map<String, List<NumberOnly>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final map = <String, List<NumberOnly>>{};
|
final map = <String, List<NumberOnly>>{};
|
||||||
if (json is Map && json.isNotEmpty) {
|
if (json is Map && json.isNotEmpty) {
|
||||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
for (final entry in json.entries) {
|
for (final entry in json.entries) {
|
||||||
final value = NumberOnly.listFromJson(entry.value, growable: growable,);
|
map[entry.key] = NumberOnly.listFromJson(entry.value, growable: growable,);
|
||||||
if (value != null) {
|
|
||||||
map[entry.key] = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
|
@ -116,7 +116,7 @@ class ObjectWithDeprecatedFields {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
static List<ObjectWithDeprecatedFields>? listFromJson(dynamic json, {bool growable = false,}) {
|
static List<ObjectWithDeprecatedFields> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final result = <ObjectWithDeprecatedFields>[];
|
final result = <ObjectWithDeprecatedFields>[];
|
||||||
if (json is List && json.isNotEmpty) {
|
if (json is List && json.isNotEmpty) {
|
||||||
for (final row in json) {
|
for (final row in json) {
|
||||||
@ -147,12 +147,10 @@ class ObjectWithDeprecatedFields {
|
|||||||
static Map<String, List<ObjectWithDeprecatedFields>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
static Map<String, List<ObjectWithDeprecatedFields>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final map = <String, List<ObjectWithDeprecatedFields>>{};
|
final map = <String, List<ObjectWithDeprecatedFields>>{};
|
||||||
if (json is Map && json.isNotEmpty) {
|
if (json is Map && json.isNotEmpty) {
|
||||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
for (final entry in json.entries) {
|
for (final entry in json.entries) {
|
||||||
final value = ObjectWithDeprecatedFields.listFromJson(entry.value, growable: growable,);
|
map[entry.key] = ObjectWithDeprecatedFields.listFromJson(entry.value, growable: growable,);
|
||||||
if (value != null) {
|
|
||||||
map[entry.key] = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
|
@ -141,7 +141,7 @@ class Order {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
static List<Order>? listFromJson(dynamic json, {bool growable = false,}) {
|
static List<Order> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final result = <Order>[];
|
final result = <Order>[];
|
||||||
if (json is List && json.isNotEmpty) {
|
if (json is List && json.isNotEmpty) {
|
||||||
for (final row in json) {
|
for (final row in json) {
|
||||||
@ -172,12 +172,10 @@ class Order {
|
|||||||
static Map<String, List<Order>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
static Map<String, List<Order>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final map = <String, List<Order>>{};
|
final map = <String, List<Order>>{};
|
||||||
if (json is Map && json.isNotEmpty) {
|
if (json is Map && json.isNotEmpty) {
|
||||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
for (final entry in json.entries) {
|
for (final entry in json.entries) {
|
||||||
final value = Order.listFromJson(entry.value, growable: growable,);
|
map[entry.key] = Order.listFromJson(entry.value, growable: growable,);
|
||||||
if (value != null) {
|
|
||||||
map[entry.key] = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
@ -214,7 +212,7 @@ class OrderStatusEnum {
|
|||||||
|
|
||||||
static OrderStatusEnum? fromJson(dynamic value) => OrderStatusEnumTypeTransformer().decode(value);
|
static OrderStatusEnum? fromJson(dynamic value) => OrderStatusEnumTypeTransformer().decode(value);
|
||||||
|
|
||||||
static List<OrderStatusEnum>? listFromJson(dynamic json, {bool growable = false,}) {
|
static List<OrderStatusEnum> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final result = <OrderStatusEnum>[];
|
final result = <OrderStatusEnum>[];
|
||||||
if (json is List && json.isNotEmpty) {
|
if (json is List && json.isNotEmpty) {
|
||||||
for (final row in json) {
|
for (final row in json) {
|
||||||
|
@ -107,7 +107,7 @@ class OuterComposite {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
static List<OuterComposite>? listFromJson(dynamic json, {bool growable = false,}) {
|
static List<OuterComposite> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final result = <OuterComposite>[];
|
final result = <OuterComposite>[];
|
||||||
if (json is List && json.isNotEmpty) {
|
if (json is List && json.isNotEmpty) {
|
||||||
for (final row in json) {
|
for (final row in json) {
|
||||||
@ -138,12 +138,10 @@ class OuterComposite {
|
|||||||
static Map<String, List<OuterComposite>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
static Map<String, List<OuterComposite>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final map = <String, List<OuterComposite>>{};
|
final map = <String, List<OuterComposite>>{};
|
||||||
if (json is Map && json.isNotEmpty) {
|
if (json is Map && json.isNotEmpty) {
|
||||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
for (final entry in json.entries) {
|
for (final entry in json.entries) {
|
||||||
final value = OuterComposite.listFromJson(entry.value, growable: growable,);
|
map[entry.key] = OuterComposite.listFromJson(entry.value, growable: growable,);
|
||||||
if (value != null) {
|
|
||||||
map[entry.key] = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
|
@ -36,7 +36,7 @@ class OuterEnum {
|
|||||||
|
|
||||||
static OuterEnum? fromJson(dynamic value) => OuterEnumTypeTransformer().decode(value);
|
static OuterEnum? fromJson(dynamic value) => OuterEnumTypeTransformer().decode(value);
|
||||||
|
|
||||||
static List<OuterEnum>? listFromJson(dynamic json, {bool growable = false,}) {
|
static List<OuterEnum> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final result = <OuterEnum>[];
|
final result = <OuterEnum>[];
|
||||||
if (json is List && json.isNotEmpty) {
|
if (json is List && json.isNotEmpty) {
|
||||||
for (final row in json) {
|
for (final row in json) {
|
||||||
|
@ -36,7 +36,7 @@ class OuterEnumDefaultValue {
|
|||||||
|
|
||||||
static OuterEnumDefaultValue? fromJson(dynamic value) => OuterEnumDefaultValueTypeTransformer().decode(value);
|
static OuterEnumDefaultValue? fromJson(dynamic value) => OuterEnumDefaultValueTypeTransformer().decode(value);
|
||||||
|
|
||||||
static List<OuterEnumDefaultValue>? listFromJson(dynamic json, {bool growable = false,}) {
|
static List<OuterEnumDefaultValue> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final result = <OuterEnumDefaultValue>[];
|
final result = <OuterEnumDefaultValue>[];
|
||||||
if (json is List && json.isNotEmpty) {
|
if (json is List && json.isNotEmpty) {
|
||||||
for (final row in json) {
|
for (final row in json) {
|
||||||
|
@ -36,7 +36,7 @@ class OuterEnumInteger {
|
|||||||
|
|
||||||
static OuterEnumInteger? fromJson(dynamic value) => OuterEnumIntegerTypeTransformer().decode(value);
|
static OuterEnumInteger? fromJson(dynamic value) => OuterEnumIntegerTypeTransformer().decode(value);
|
||||||
|
|
||||||
static List<OuterEnumInteger>? listFromJson(dynamic json, {bool growable = false,}) {
|
static List<OuterEnumInteger> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final result = <OuterEnumInteger>[];
|
final result = <OuterEnumInteger>[];
|
||||||
if (json is List && json.isNotEmpty) {
|
if (json is List && json.isNotEmpty) {
|
||||||
for (final row in json) {
|
for (final row in json) {
|
||||||
|
@ -36,7 +36,7 @@ class OuterEnumIntegerDefaultValue {
|
|||||||
|
|
||||||
static OuterEnumIntegerDefaultValue? fromJson(dynamic value) => OuterEnumIntegerDefaultValueTypeTransformer().decode(value);
|
static OuterEnumIntegerDefaultValue? fromJson(dynamic value) => OuterEnumIntegerDefaultValueTypeTransformer().decode(value);
|
||||||
|
|
||||||
static List<OuterEnumIntegerDefaultValue>? listFromJson(dynamic json, {bool growable = false,}) {
|
static List<OuterEnumIntegerDefaultValue> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final result = <OuterEnumIntegerDefaultValue>[];
|
final result = <OuterEnumIntegerDefaultValue>[];
|
||||||
if (json is List && json.isNotEmpty) {
|
if (json is List && json.isNotEmpty) {
|
||||||
for (final row in json) {
|
for (final row in json) {
|
||||||
|
@ -61,7 +61,7 @@ class OuterObjectWithEnumProperty {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
static List<OuterObjectWithEnumProperty>? listFromJson(dynamic json, {bool growable = false,}) {
|
static List<OuterObjectWithEnumProperty> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final result = <OuterObjectWithEnumProperty>[];
|
final result = <OuterObjectWithEnumProperty>[];
|
||||||
if (json is List && json.isNotEmpty) {
|
if (json is List && json.isNotEmpty) {
|
||||||
for (final row in json) {
|
for (final row in json) {
|
||||||
@ -92,12 +92,10 @@ class OuterObjectWithEnumProperty {
|
|||||||
static Map<String, List<OuterObjectWithEnumProperty>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
static Map<String, List<OuterObjectWithEnumProperty>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final map = <String, List<OuterObjectWithEnumProperty>>{};
|
final map = <String, List<OuterObjectWithEnumProperty>>{};
|
||||||
if (json is Map && json.isNotEmpty) {
|
if (json is Map && json.isNotEmpty) {
|
||||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
for (final entry in json.entries) {
|
for (final entry in json.entries) {
|
||||||
final value = OuterObjectWithEnumProperty.listFromJson(entry.value, growable: growable,);
|
map[entry.key] = OuterObjectWithEnumProperty.listFromJson(entry.value, growable: growable,);
|
||||||
if (value != null) {
|
|
||||||
map[entry.key] = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
|
@ -116,14 +116,14 @@ class Pet {
|
|||||||
photoUrls: json[r'photoUrls'] is Set
|
photoUrls: json[r'photoUrls'] is Set
|
||||||
? (json[r'photoUrls'] as Set).cast<String>()
|
? (json[r'photoUrls'] as Set).cast<String>()
|
||||||
: const {},
|
: const {},
|
||||||
tags: Tag.listFromJson(json[r'tags']) ?? const [],
|
tags: Tag.listFromJson(json[r'tags']),
|
||||||
status: PetStatusEnum.fromJson(json[r'status']),
|
status: PetStatusEnum.fromJson(json[r'status']),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
static List<Pet>? listFromJson(dynamic json, {bool growable = false,}) {
|
static List<Pet> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final result = <Pet>[];
|
final result = <Pet>[];
|
||||||
if (json is List && json.isNotEmpty) {
|
if (json is List && json.isNotEmpty) {
|
||||||
for (final row in json) {
|
for (final row in json) {
|
||||||
@ -154,12 +154,10 @@ class Pet {
|
|||||||
static Map<String, List<Pet>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
static Map<String, List<Pet>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final map = <String, List<Pet>>{};
|
final map = <String, List<Pet>>{};
|
||||||
if (json is Map && json.isNotEmpty) {
|
if (json is Map && json.isNotEmpty) {
|
||||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
for (final entry in json.entries) {
|
for (final entry in json.entries) {
|
||||||
final value = Pet.listFromJson(entry.value, growable: growable,);
|
map[entry.key] = Pet.listFromJson(entry.value, growable: growable,);
|
||||||
if (value != null) {
|
|
||||||
map[entry.key] = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
@ -198,7 +196,7 @@ class PetStatusEnum {
|
|||||||
|
|
||||||
static PetStatusEnum? fromJson(dynamic value) => PetStatusEnumTypeTransformer().decode(value);
|
static PetStatusEnum? fromJson(dynamic value) => PetStatusEnumTypeTransformer().decode(value);
|
||||||
|
|
||||||
static List<PetStatusEnum>? listFromJson(dynamic json, {bool growable = false,}) {
|
static List<PetStatusEnum> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final result = <PetStatusEnum>[];
|
final result = <PetStatusEnum>[];
|
||||||
if (json is List && json.isNotEmpty) {
|
if (json is List && json.isNotEmpty) {
|
||||||
for (final row in json) {
|
for (final row in json) {
|
||||||
|
@ -88,7 +88,7 @@ class ReadOnlyFirst {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
static List<ReadOnlyFirst>? listFromJson(dynamic json, {bool growable = false,}) {
|
static List<ReadOnlyFirst> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final result = <ReadOnlyFirst>[];
|
final result = <ReadOnlyFirst>[];
|
||||||
if (json is List && json.isNotEmpty) {
|
if (json is List && json.isNotEmpty) {
|
||||||
for (final row in json) {
|
for (final row in json) {
|
||||||
@ -119,12 +119,10 @@ class ReadOnlyFirst {
|
|||||||
static Map<String, List<ReadOnlyFirst>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
static Map<String, List<ReadOnlyFirst>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final map = <String, List<ReadOnlyFirst>>{};
|
final map = <String, List<ReadOnlyFirst>>{};
|
||||||
if (json is Map && json.isNotEmpty) {
|
if (json is Map && json.isNotEmpty) {
|
||||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
for (final entry in json.entries) {
|
for (final entry in json.entries) {
|
||||||
final value = ReadOnlyFirst.listFromJson(entry.value, growable: growable,);
|
map[entry.key] = ReadOnlyFirst.listFromJson(entry.value, growable: growable,);
|
||||||
if (value != null) {
|
|
||||||
map[entry.key] = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
|
@ -34,7 +34,7 @@ class SingleRefType {
|
|||||||
|
|
||||||
static SingleRefType? fromJson(dynamic value) => SingleRefTypeTypeTransformer().decode(value);
|
static SingleRefType? fromJson(dynamic value) => SingleRefTypeTypeTransformer().decode(value);
|
||||||
|
|
||||||
static List<SingleRefType>? listFromJson(dynamic json, {bool growable = false,}) {
|
static List<SingleRefType> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final result = <SingleRefType>[];
|
final result = <SingleRefType>[];
|
||||||
if (json is List && json.isNotEmpty) {
|
if (json is List && json.isNotEmpty) {
|
||||||
for (final row in json) {
|
for (final row in json) {
|
||||||
|
@ -71,7 +71,7 @@ class SpecialModelName {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
static List<SpecialModelName>? listFromJson(dynamic json, {bool growable = false,}) {
|
static List<SpecialModelName> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final result = <SpecialModelName>[];
|
final result = <SpecialModelName>[];
|
||||||
if (json is List && json.isNotEmpty) {
|
if (json is List && json.isNotEmpty) {
|
||||||
for (final row in json) {
|
for (final row in json) {
|
||||||
@ -102,12 +102,10 @@ class SpecialModelName {
|
|||||||
static Map<String, List<SpecialModelName>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
static Map<String, List<SpecialModelName>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final map = <String, List<SpecialModelName>>{};
|
final map = <String, List<SpecialModelName>>{};
|
||||||
if (json is Map && json.isNotEmpty) {
|
if (json is Map && json.isNotEmpty) {
|
||||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
for (final entry in json.entries) {
|
for (final entry in json.entries) {
|
||||||
final value = SpecialModelName.listFromJson(entry.value, growable: growable,);
|
map[entry.key] = SpecialModelName.listFromJson(entry.value, growable: growable,);
|
||||||
if (value != null) {
|
|
||||||
map[entry.key] = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
|
@ -88,7 +88,7 @@ class Tag {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
static List<Tag>? listFromJson(dynamic json, {bool growable = false,}) {
|
static List<Tag> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final result = <Tag>[];
|
final result = <Tag>[];
|
||||||
if (json is List && json.isNotEmpty) {
|
if (json is List && json.isNotEmpty) {
|
||||||
for (final row in json) {
|
for (final row in json) {
|
||||||
@ -119,12 +119,10 @@ class Tag {
|
|||||||
static Map<String, List<Tag>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
static Map<String, List<Tag>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final map = <String, List<Tag>>{};
|
final map = <String, List<Tag>>{};
|
||||||
if (json is Map && json.isNotEmpty) {
|
if (json is Map && json.isNotEmpty) {
|
||||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
for (final entry in json.entries) {
|
for (final entry in json.entries) {
|
||||||
final value = Tag.listFromJson(entry.value, growable: growable,);
|
map[entry.key] = Tag.listFromJson(entry.value, growable: growable,);
|
||||||
if (value != null) {
|
|
||||||
map[entry.key] = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
|
@ -191,7 +191,7 @@ class User {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
static List<User>? listFromJson(dynamic json, {bool growable = false,}) {
|
static List<User> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final result = <User>[];
|
final result = <User>[];
|
||||||
if (json is List && json.isNotEmpty) {
|
if (json is List && json.isNotEmpty) {
|
||||||
for (final row in json) {
|
for (final row in json) {
|
||||||
@ -222,12 +222,10 @@ class User {
|
|||||||
static Map<String, List<User>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
static Map<String, List<User>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
final map = <String, List<User>>{};
|
final map = <String, List<User>>{};
|
||||||
if (json is Map && json.isNotEmpty) {
|
if (json is Map && json.isNotEmpty) {
|
||||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
for (final entry in json.entries) {
|
for (final entry in json.entries) {
|
||||||
final value = User.listFromJson(entry.value, growable: growable,);
|
map[entry.key] = User.listFromJson(entry.value, growable: growable,);
|
||||||
if (value != null) {
|
|
||||||
map[entry.key] = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user