forked from loafle/openapi-generator-original
[dart] fix some compilation issues and added casts for analyzer implicit-casts flag (#8244)
* fix: missing dart casts and analyzer issues * chore: regenerate dart template files * refactor: remove unneeded implicit-casts:false and regenerate sources * chore: regenerate templates after merge * chore: regenerate dart pet store codes
This commit is contained in:
parent
48e05ce162
commit
44c1fee3e2
@ -64,6 +64,7 @@ public class DartClientCodegen extends AbstractDartCodegen {
|
||||
|
||||
final String libFolder = sourceFolder + File.separator + "lib";
|
||||
supportingFiles.add(new SupportingFile("pubspec.mustache", "", "pubspec.yaml"));
|
||||
supportingFiles.add(new SupportingFile("analysis_options.mustache", "", "analysis_options.yaml"));
|
||||
supportingFiles.add(new SupportingFile("api_client.mustache", libFolder, "api_client.dart"));
|
||||
supportingFiles.add(new SupportingFile("api_exception.mustache", libFolder, "api_exception.dart"));
|
||||
supportingFiles.add(new SupportingFile("api_helper.mustache", libFolder, "api_helper.dart"));
|
||||
|
3
modules/openapi-generator/src/main/resources/dart2/analysis_options.mustache
vendored
Normal file
3
modules/openapi-generator/src/main/resources/dart2/analysis_options.mustache
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
analyzer:
|
||||
strong-mode:
|
||||
implicit-casts: true
|
@ -65,7 +65,7 @@ class ApiClient {
|
||||
Future<Response> invokeAPI(
|
||||
String path,
|
||||
String method,
|
||||
Iterable<QueryParam> queryParams,
|
||||
List<QueryParam> queryParams,
|
||||
Object body,
|
||||
Map<String, String> headerParams,
|
||||
Map<String, String> formParams,
|
||||
@ -177,13 +177,13 @@ class ApiClient {
|
||||
List<QueryParam> queryParams,
|
||||
Map<String, String> headerParams,
|
||||
) {
|
||||
authNames.forEach((authName) {
|
||||
for(final authName in authNames) {
|
||||
final auth = _authentications[authName];
|
||||
if (auth == null) {
|
||||
throw ArgumentError('Authentication undefined: $authName');
|
||||
}
|
||||
auth.applyToParams(queryParams, headerParams);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
{{#native_serialization}}
|
||||
|
@ -132,9 +132,19 @@ class {{{classname}}} {
|
||||
{{/items.complexType}}
|
||||
{{/items.isArray}}
|
||||
{{^items.isArray}}
|
||||
{{#items.isMap}}
|
||||
{{{name}}}: json[r'{{{baseName}}}'] == null
|
||||
? null
|
||||
: {{{complexType}}}.mapFromJson(json[r'{{{baseName}}}']),
|
||||
{{#items.complexType}}
|
||||
: {{items.complexType}}.mapFromJson(json[r'{{{baseName}}}']),
|
||||
{{/items.complexType}}
|
||||
{{^items.complexType}}
|
||||
: (json[r'{{{baseName}}}'] as Map).cast<String, Map>(),
|
||||
{{/items.complexType}}
|
||||
{{/items.isMap}}
|
||||
{{^items.isMap}}
|
||||
{{{name}}}: json[r'{{{baseName}}}']
|
||||
{{/items.isMap}}
|
||||
{{/items.isArray}}
|
||||
{{/isMap}}
|
||||
{{^isMap}}
|
||||
@ -189,12 +199,12 @@ class {{{classname}}} {
|
||||
static List<{{{classname}}}> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <{{{classname}}}>[]
|
||||
: json.map((v) => {{{classname}}}.fromJson(v)).toList(growable: true == growable);
|
||||
: json.map((dynamic value) => {{{classname}}}.fromJson(value)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, {{{classname}}}> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, {{{classname}}}>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) => map[key] = {{{classname}}}.fromJson(v));
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) => map[key] = {{{classname}}}.fromJson(value));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
@ -202,9 +212,9 @@ class {{{classname}}} {
|
||||
// maps a json object with a list of {{{classname}}}-objects as value to a dart map
|
||||
static Map<String, List<{{{classname}}}>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<{{{classname}}}>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = {{{classname}}}.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) {
|
||||
map[key] = {{{classname}}}.listFromJson(value, emptyIsNull: emptyIsNull, growable: growable,);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
|
@ -1,6 +1,7 @@
|
||||
.gitignore
|
||||
.travis.yml
|
||||
README.md
|
||||
analysis_options.yaml
|
||||
doc/ApiResponse.md
|
||||
doc/Category.md
|
||||
doc/Order.md
|
||||
|
@ -0,0 +1,3 @@
|
||||
analyzer:
|
||||
strong-mode:
|
||||
implicit-casts: true
|
@ -58,7 +58,7 @@ class ApiClient {
|
||||
Future<Response> invokeAPI(
|
||||
String path,
|
||||
String method,
|
||||
Iterable<QueryParam> queryParams,
|
||||
List<QueryParam> queryParams,
|
||||
Object body,
|
||||
Map<String, String> headerParams,
|
||||
Map<String, String> formParams,
|
||||
@ -168,13 +168,13 @@ class ApiClient {
|
||||
List<QueryParam> queryParams,
|
||||
Map<String, String> headerParams,
|
||||
) {
|
||||
authNames.forEach((authName) {
|
||||
for(final authName in authNames) {
|
||||
final auth = _authentications[authName];
|
||||
if (auth == null) {
|
||||
throw ArgumentError('Authentication undefined: $authName');
|
||||
}
|
||||
auth.applyToParams(queryParams, headerParams);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
static dynamic _deserialize(dynamic value, String targetType, {bool growable}) {
|
||||
|
@ -65,12 +65,12 @@ class ApiResponse {
|
||||
static List<ApiResponse> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <ApiResponse>[]
|
||||
: json.map((v) => ApiResponse.fromJson(v)).toList(growable: true == growable);
|
||||
: json.map((dynamic value) => ApiResponse.fromJson(value)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, ApiResponse> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, ApiResponse>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) => map[key] = ApiResponse.fromJson(v));
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) => map[key] = ApiResponse.fromJson(value));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
@ -78,9 +78,9 @@ class ApiResponse {
|
||||
// maps a json object with a list of ApiResponse-objects as value to a dart map
|
||||
static Map<String, List<ApiResponse>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<ApiResponse>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = ApiResponse.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) {
|
||||
map[key] = ApiResponse.listFromJson(value, emptyIsNull: emptyIsNull, growable: growable,);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
|
@ -56,12 +56,12 @@ class Category {
|
||||
static List<Category> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <Category>[]
|
||||
: json.map((v) => Category.fromJson(v)).toList(growable: true == growable);
|
||||
: json.map((dynamic value) => Category.fromJson(value)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, Category> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, Category>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) => map[key] = Category.fromJson(v));
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) => map[key] = Category.fromJson(value));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
@ -69,9 +69,9 @@ class Category {
|
||||
// maps a json object with a list of Category-objects as value to a dart map
|
||||
static Map<String, List<Category>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<Category>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = Category.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) {
|
||||
map[key] = Category.listFromJson(value, emptyIsNull: emptyIsNull, growable: growable,);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
|
@ -95,12 +95,12 @@ class Order {
|
||||
static List<Order> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <Order>[]
|
||||
: json.map((v) => Order.fromJson(v)).toList(growable: true == growable);
|
||||
: json.map((dynamic value) => Order.fromJson(value)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, Order> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, Order>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) => map[key] = Order.fromJson(v));
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) => map[key] = Order.fromJson(value));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
@ -108,9 +108,9 @@ class Order {
|
||||
// maps a json object with a list of Order-objects as value to a dart map
|
||||
static Map<String, List<Order>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<Order>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = Order.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) {
|
||||
map[key] = Order.listFromJson(value, emptyIsNull: emptyIsNull, growable: growable,);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
|
@ -91,12 +91,12 @@ class Pet {
|
||||
static List<Pet> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <Pet>[]
|
||||
: json.map((v) => Pet.fromJson(v)).toList(growable: true == growable);
|
||||
: json.map((dynamic value) => Pet.fromJson(value)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, Pet> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, Pet>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) => map[key] = Pet.fromJson(v));
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) => map[key] = Pet.fromJson(value));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
@ -104,9 +104,9 @@ class Pet {
|
||||
// maps a json object with a list of Pet-objects as value to a dart map
|
||||
static Map<String, List<Pet>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<Pet>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = Pet.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) {
|
||||
map[key] = Pet.listFromJson(value, emptyIsNull: emptyIsNull, growable: growable,);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
|
@ -56,12 +56,12 @@ class Tag {
|
||||
static List<Tag> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <Tag>[]
|
||||
: json.map((v) => Tag.fromJson(v)).toList(growable: true == growable);
|
||||
: json.map((dynamic value) => Tag.fromJson(value)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, Tag> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, Tag>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) => map[key] = Tag.fromJson(v));
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) => map[key] = Tag.fromJson(value));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
@ -69,9 +69,9 @@ class Tag {
|
||||
// maps a json object with a list of Tag-objects as value to a dart map
|
||||
static Map<String, List<Tag>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<Tag>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = Tag.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) {
|
||||
map[key] = Tag.listFromJson(value, emptyIsNull: emptyIsNull, growable: growable,);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
|
@ -111,12 +111,12 @@ class User {
|
||||
static List<User> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <User>[]
|
||||
: json.map((v) => User.fromJson(v)).toList(growable: true == growable);
|
||||
: json.map((dynamic value) => User.fromJson(value)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, User> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, User>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) => map[key] = User.fromJson(v));
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) => map[key] = User.fromJson(value));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
@ -124,9 +124,9 @@ class User {
|
||||
// maps a json object with a list of User-objects as value to a dart map
|
||||
static Map<String, List<User>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<User>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = User.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) {
|
||||
map[key] = User.listFromJson(value, emptyIsNull: emptyIsNull, growable: growable,);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
|
@ -1,6 +1,7 @@
|
||||
.gitignore
|
||||
.travis.yml
|
||||
README.md
|
||||
analysis_options.yaml
|
||||
doc/AdditionalPropertiesClass.md
|
||||
doc/Animal.md
|
||||
doc/AnotherFakeApi.md
|
||||
|
@ -0,0 +1,3 @@
|
||||
analyzer:
|
||||
strong-mode:
|
||||
implicit-casts: true
|
@ -61,7 +61,7 @@ class ApiClient {
|
||||
Future<Response> invokeAPI(
|
||||
String path,
|
||||
String method,
|
||||
Iterable<QueryParam> queryParams,
|
||||
List<QueryParam> queryParams,
|
||||
Object body,
|
||||
Map<String, String> headerParams,
|
||||
Map<String, String> formParams,
|
||||
@ -171,13 +171,13 @@ class ApiClient {
|
||||
List<QueryParam> queryParams,
|
||||
Map<String, String> headerParams,
|
||||
) {
|
||||
authNames.forEach((authName) {
|
||||
for(final authName in authNames) {
|
||||
final auth = _authentications[authName];
|
||||
if (auth == null) {
|
||||
throw ArgumentError('Authentication undefined: $authName');
|
||||
}
|
||||
auth.applyToParams(queryParams, headerParams);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
static dynamic _deserialize(dynamic value, String targetType, {bool growable}) {
|
||||
|
@ -54,18 +54,18 @@ class AdditionalPropertiesClass {
|
||||
(json[r'map_property'] as Map).cast<String, String>(),
|
||||
mapOfMapProperty: json[r'map_of_map_property'] == null
|
||||
? null
|
||||
: Map.mapFromJson(json[r'map_of_map_property']),
|
||||
: (json[r'map_of_map_property'] as Map).cast<String, Map>(),
|
||||
);
|
||||
|
||||
static List<AdditionalPropertiesClass> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <AdditionalPropertiesClass>[]
|
||||
: json.map((v) => AdditionalPropertiesClass.fromJson(v)).toList(growable: true == growable);
|
||||
: json.map((dynamic value) => AdditionalPropertiesClass.fromJson(value)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, AdditionalPropertiesClass> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, AdditionalPropertiesClass>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) => map[key] = AdditionalPropertiesClass.fromJson(v));
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) => map[key] = AdditionalPropertiesClass.fromJson(value));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
@ -73,9 +73,9 @@ class AdditionalPropertiesClass {
|
||||
// maps a json object with a list of AdditionalPropertiesClass-objects as value to a dart map
|
||||
static Map<String, List<AdditionalPropertiesClass>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<AdditionalPropertiesClass>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = AdditionalPropertiesClass.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) {
|
||||
map[key] = AdditionalPropertiesClass.listFromJson(value, emptyIsNull: emptyIsNull, growable: growable,);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
|
@ -54,12 +54,12 @@ class Animal {
|
||||
static List<Animal> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <Animal>[]
|
||||
: json.map((v) => Animal.fromJson(v)).toList(growable: true == growable);
|
||||
: json.map((dynamic value) => Animal.fromJson(value)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, Animal> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, Animal>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) => map[key] = Animal.fromJson(v));
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) => map[key] = Animal.fromJson(value));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
@ -67,9 +67,9 @@ class Animal {
|
||||
// maps a json object with a list of Animal-objects as value to a dart map
|
||||
static Map<String, List<Animal>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<Animal>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = Animal.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) {
|
||||
map[key] = Animal.listFromJson(value, emptyIsNull: emptyIsNull, growable: growable,);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
|
@ -65,12 +65,12 @@ class ApiResponse {
|
||||
static List<ApiResponse> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <ApiResponse>[]
|
||||
: json.map((v) => ApiResponse.fromJson(v)).toList(growable: true == growable);
|
||||
: json.map((dynamic value) => ApiResponse.fromJson(value)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, ApiResponse> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, ApiResponse>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) => map[key] = ApiResponse.fromJson(v));
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) => map[key] = ApiResponse.fromJson(value));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
@ -78,9 +78,9 @@ class ApiResponse {
|
||||
// maps a json object with a list of ApiResponse-objects as value to a dart map
|
||||
static Map<String, List<ApiResponse>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<ApiResponse>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = ApiResponse.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) {
|
||||
map[key] = ApiResponse.listFromJson(value, emptyIsNull: emptyIsNull, growable: growable,);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
|
@ -51,12 +51,12 @@ class ArrayOfArrayOfNumberOnly {
|
||||
static List<ArrayOfArrayOfNumberOnly> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <ArrayOfArrayOfNumberOnly>[]
|
||||
: json.map((v) => ArrayOfArrayOfNumberOnly.fromJson(v)).toList(growable: true == growable);
|
||||
: json.map((dynamic value) => ArrayOfArrayOfNumberOnly.fromJson(value)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, ArrayOfArrayOfNumberOnly> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, ArrayOfArrayOfNumberOnly>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) => map[key] = ArrayOfArrayOfNumberOnly.fromJson(v));
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) => map[key] = ArrayOfArrayOfNumberOnly.fromJson(value));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
@ -64,9 +64,9 @@ class ArrayOfArrayOfNumberOnly {
|
||||
// maps a json object with a list of ArrayOfArrayOfNumberOnly-objects as value to a dart map
|
||||
static Map<String, List<ArrayOfArrayOfNumberOnly>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<ArrayOfArrayOfNumberOnly>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = ArrayOfArrayOfNumberOnly.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) {
|
||||
map[key] = ArrayOfArrayOfNumberOnly.listFromJson(value, emptyIsNull: emptyIsNull, growable: growable,);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
|
@ -49,12 +49,12 @@ class ArrayOfNumberOnly {
|
||||
static List<ArrayOfNumberOnly> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <ArrayOfNumberOnly>[]
|
||||
: json.map((v) => ArrayOfNumberOnly.fromJson(v)).toList(growable: true == growable);
|
||||
: json.map((dynamic value) => ArrayOfNumberOnly.fromJson(value)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, ArrayOfNumberOnly> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, ArrayOfNumberOnly>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) => map[key] = ArrayOfNumberOnly.fromJson(v));
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) => map[key] = ArrayOfNumberOnly.fromJson(value));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
@ -62,9 +62,9 @@ class ArrayOfNumberOnly {
|
||||
// maps a json object with a list of ArrayOfNumberOnly-objects as value to a dart map
|
||||
static Map<String, List<ArrayOfNumberOnly>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<ArrayOfNumberOnly>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = ArrayOfNumberOnly.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) {
|
||||
map[key] = ArrayOfNumberOnly.listFromJson(value, emptyIsNull: emptyIsNull, growable: growable,);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
|
@ -75,12 +75,12 @@ class ArrayTest {
|
||||
static List<ArrayTest> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <ArrayTest>[]
|
||||
: json.map((v) => ArrayTest.fromJson(v)).toList(growable: true == growable);
|
||||
: json.map((dynamic value) => ArrayTest.fromJson(value)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, ArrayTest> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, ArrayTest>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) => map[key] = ArrayTest.fromJson(v));
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) => map[key] = ArrayTest.fromJson(value));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
@ -88,9 +88,9 @@ class ArrayTest {
|
||||
// maps a json object with a list of ArrayTest-objects as value to a dart map
|
||||
static Map<String, List<ArrayTest>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<ArrayTest>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = ArrayTest.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) {
|
||||
map[key] = ArrayTest.listFromJson(value, emptyIsNull: emptyIsNull, growable: growable,);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
|
@ -93,12 +93,12 @@ class Capitalization {
|
||||
static List<Capitalization> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <Capitalization>[]
|
||||
: json.map((v) => Capitalization.fromJson(v)).toList(growable: true == growable);
|
||||
: json.map((dynamic value) => Capitalization.fromJson(value)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, Capitalization> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, Capitalization>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) => map[key] = Capitalization.fromJson(v));
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) => map[key] = Capitalization.fromJson(value));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
@ -106,9 +106,9 @@ class Capitalization {
|
||||
// maps a json object with a list of Capitalization-objects as value to a dart map
|
||||
static Map<String, List<Capitalization>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<Capitalization>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = Capitalization.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) {
|
||||
map[key] = Capitalization.listFromJson(value, emptyIsNull: emptyIsNull, growable: growable,);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
|
@ -63,12 +63,12 @@ class Cat {
|
||||
static List<Cat> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <Cat>[]
|
||||
: json.map((v) => Cat.fromJson(v)).toList(growable: true == growable);
|
||||
: json.map((dynamic value) => Cat.fromJson(value)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, Cat> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, Cat>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) => map[key] = Cat.fromJson(v));
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) => map[key] = Cat.fromJson(value));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
@ -76,9 +76,9 @@ class Cat {
|
||||
// maps a json object with a list of Cat-objects as value to a dart map
|
||||
static Map<String, List<Cat>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<Cat>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = Cat.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) {
|
||||
map[key] = Cat.listFromJson(value, emptyIsNull: emptyIsNull, growable: growable,);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
|
@ -47,12 +47,12 @@ class CatAllOf {
|
||||
static List<CatAllOf> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <CatAllOf>[]
|
||||
: json.map((v) => CatAllOf.fromJson(v)).toList(growable: true == growable);
|
||||
: json.map((dynamic value) => CatAllOf.fromJson(value)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, CatAllOf> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, CatAllOf>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) => map[key] = CatAllOf.fromJson(v));
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) => map[key] = CatAllOf.fromJson(value));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
@ -60,9 +60,9 @@ class CatAllOf {
|
||||
// maps a json object with a list of CatAllOf-objects as value to a dart map
|
||||
static Map<String, List<CatAllOf>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<CatAllOf>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = CatAllOf.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) {
|
||||
map[key] = CatAllOf.listFromJson(value, emptyIsNull: emptyIsNull, growable: growable,);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
|
@ -54,12 +54,12 @@ class Category {
|
||||
static List<Category> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <Category>[]
|
||||
: json.map((v) => Category.fromJson(v)).toList(growable: true == growable);
|
||||
: json.map((dynamic value) => Category.fromJson(value)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, Category> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, Category>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) => map[key] = Category.fromJson(v));
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) => map[key] = Category.fromJson(value));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
@ -67,9 +67,9 @@ class Category {
|
||||
// maps a json object with a list of Category-objects as value to a dart map
|
||||
static Map<String, List<Category>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<Category>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = Category.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) {
|
||||
map[key] = Category.listFromJson(value, emptyIsNull: emptyIsNull, growable: growable,);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
|
@ -47,12 +47,12 @@ class ClassModel {
|
||||
static List<ClassModel> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <ClassModel>[]
|
||||
: json.map((v) => ClassModel.fromJson(v)).toList(growable: true == growable);
|
||||
: json.map((dynamic value) => ClassModel.fromJson(value)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, ClassModel> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, ClassModel>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) => map[key] = ClassModel.fromJson(v));
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) => map[key] = ClassModel.fromJson(value));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
@ -60,9 +60,9 @@ class ClassModel {
|
||||
// maps a json object with a list of ClassModel-objects as value to a dart map
|
||||
static Map<String, List<ClassModel>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<ClassModel>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = ClassModel.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) {
|
||||
map[key] = ClassModel.listFromJson(value, emptyIsNull: emptyIsNull, growable: growable,);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
|
@ -63,12 +63,12 @@ class Dog {
|
||||
static List<Dog> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <Dog>[]
|
||||
: json.map((v) => Dog.fromJson(v)).toList(growable: true == growable);
|
||||
: json.map((dynamic value) => Dog.fromJson(value)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, Dog> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, Dog>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) => map[key] = Dog.fromJson(v));
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) => map[key] = Dog.fromJson(value));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
@ -76,9 +76,9 @@ class Dog {
|
||||
// maps a json object with a list of Dog-objects as value to a dart map
|
||||
static Map<String, List<Dog>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<Dog>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = Dog.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) {
|
||||
map[key] = Dog.listFromJson(value, emptyIsNull: emptyIsNull, growable: growable,);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
|
@ -47,12 +47,12 @@ class DogAllOf {
|
||||
static List<DogAllOf> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <DogAllOf>[]
|
||||
: json.map((v) => DogAllOf.fromJson(v)).toList(growable: true == growable);
|
||||
: json.map((dynamic value) => DogAllOf.fromJson(value)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, DogAllOf> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, DogAllOf>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) => map[key] = DogAllOf.fromJson(v));
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) => map[key] = DogAllOf.fromJson(value));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
@ -60,9 +60,9 @@ class DogAllOf {
|
||||
// maps a json object with a list of DogAllOf-objects as value to a dart map
|
||||
static Map<String, List<DogAllOf>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<DogAllOf>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = DogAllOf.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) {
|
||||
map[key] = DogAllOf.listFromJson(value, emptyIsNull: emptyIsNull, growable: growable,);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
|
@ -56,12 +56,12 @@ class EnumArrays {
|
||||
static List<EnumArrays> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <EnumArrays>[]
|
||||
: json.map((v) => EnumArrays.fromJson(v)).toList(growable: true == growable);
|
||||
: json.map((dynamic value) => EnumArrays.fromJson(value)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, EnumArrays> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, EnumArrays>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) => map[key] = EnumArrays.fromJson(v));
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) => map[key] = EnumArrays.fromJson(value));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
@ -69,9 +69,9 @@ class EnumArrays {
|
||||
// maps a json object with a list of EnumArrays-objects as value to a dart map
|
||||
static Map<String, List<EnumArrays>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<EnumArrays>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = EnumArrays.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) {
|
||||
map[key] = EnumArrays.listFromJson(value, emptyIsNull: emptyIsNull, growable: growable,);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
|
@ -108,12 +108,12 @@ class EnumTest {
|
||||
static List<EnumTest> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <EnumTest>[]
|
||||
: json.map((v) => EnumTest.fromJson(v)).toList(growable: true == growable);
|
||||
: json.map((dynamic value) => EnumTest.fromJson(value)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, EnumTest> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, EnumTest>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) => map[key] = EnumTest.fromJson(v));
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) => map[key] = EnumTest.fromJson(value));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
@ -121,9 +121,9 @@ class EnumTest {
|
||||
// maps a json object with a list of EnumTest-objects as value to a dart map
|
||||
static Map<String, List<EnumTest>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<EnumTest>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = EnumTest.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) {
|
||||
map[key] = EnumTest.listFromJson(value, emptyIsNull: emptyIsNull, growable: growable,);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
|
@ -56,12 +56,12 @@ class FileSchemaTestClass {
|
||||
static List<FileSchemaTestClass> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <FileSchemaTestClass>[]
|
||||
: json.map((v) => FileSchemaTestClass.fromJson(v)).toList(growable: true == growable);
|
||||
: json.map((dynamic value) => FileSchemaTestClass.fromJson(value)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, FileSchemaTestClass> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, FileSchemaTestClass>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) => map[key] = FileSchemaTestClass.fromJson(v));
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) => map[key] = FileSchemaTestClass.fromJson(value));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
@ -69,9 +69,9 @@ class FileSchemaTestClass {
|
||||
// maps a json object with a list of FileSchemaTestClass-objects as value to a dart map
|
||||
static Map<String, List<FileSchemaTestClass>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<FileSchemaTestClass>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = FileSchemaTestClass.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) {
|
||||
map[key] = FileSchemaTestClass.listFromJson(value, emptyIsNull: emptyIsNull, growable: growable,);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
|
@ -47,12 +47,12 @@ class Foo {
|
||||
static List<Foo> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <Foo>[]
|
||||
: json.map((v) => Foo.fromJson(v)).toList(growable: true == growable);
|
||||
: json.map((dynamic value) => Foo.fromJson(value)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, Foo> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, Foo>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) => map[key] = Foo.fromJson(v));
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) => map[key] = Foo.fromJson(value));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
@ -60,9 +60,9 @@ class Foo {
|
||||
// maps a json object with a list of Foo-objects as value to a dart map
|
||||
static Map<String, List<Foo>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<Foo>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = Foo.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) {
|
||||
map[key] = Foo.listFromJson(value, emptyIsNull: emptyIsNull, growable: growable,);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
|
@ -192,12 +192,12 @@ class FormatTest {
|
||||
static List<FormatTest> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <FormatTest>[]
|
||||
: json.map((v) => FormatTest.fromJson(v)).toList(growable: true == growable);
|
||||
: json.map((dynamic value) => FormatTest.fromJson(value)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, FormatTest> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, FormatTest>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) => map[key] = FormatTest.fromJson(v));
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) => map[key] = FormatTest.fromJson(value));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
@ -205,9 +205,9 @@ class FormatTest {
|
||||
// maps a json object with a list of FormatTest-objects as value to a dart map
|
||||
static Map<String, List<FormatTest>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<FormatTest>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = FormatTest.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) {
|
||||
map[key] = FormatTest.listFromJson(value, emptyIsNull: emptyIsNull, growable: growable,);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
|
@ -56,12 +56,12 @@ class HasOnlyReadOnly {
|
||||
static List<HasOnlyReadOnly> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <HasOnlyReadOnly>[]
|
||||
: json.map((v) => HasOnlyReadOnly.fromJson(v)).toList(growable: true == growable);
|
||||
: json.map((dynamic value) => HasOnlyReadOnly.fromJson(value)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, HasOnlyReadOnly> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, HasOnlyReadOnly>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) => map[key] = HasOnlyReadOnly.fromJson(v));
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) => map[key] = HasOnlyReadOnly.fromJson(value));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
@ -69,9 +69,9 @@ class HasOnlyReadOnly {
|
||||
// maps a json object with a list of HasOnlyReadOnly-objects as value to a dart map
|
||||
static Map<String, List<HasOnlyReadOnly>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<HasOnlyReadOnly>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = HasOnlyReadOnly.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) {
|
||||
map[key] = HasOnlyReadOnly.listFromJson(value, emptyIsNull: emptyIsNull, growable: growable,);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
|
@ -47,12 +47,12 @@ class HealthCheckResult {
|
||||
static List<HealthCheckResult> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <HealthCheckResult>[]
|
||||
: json.map((v) => HealthCheckResult.fromJson(v)).toList(growable: true == growable);
|
||||
: json.map((dynamic value) => HealthCheckResult.fromJson(value)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, HealthCheckResult> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, HealthCheckResult>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) => map[key] = HealthCheckResult.fromJson(v));
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) => map[key] = HealthCheckResult.fromJson(value));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
@ -60,9 +60,9 @@ class HealthCheckResult {
|
||||
// maps a json object with a list of HealthCheckResult-objects as value to a dart map
|
||||
static Map<String, List<HealthCheckResult>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<HealthCheckResult>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = HealthCheckResult.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) {
|
||||
map[key] = HealthCheckResult.listFromJson(value, emptyIsNull: emptyIsNull, growable: growable,);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
|
@ -47,12 +47,12 @@ class InlineResponseDefault {
|
||||
static List<InlineResponseDefault> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <InlineResponseDefault>[]
|
||||
: json.map((v) => InlineResponseDefault.fromJson(v)).toList(growable: true == growable);
|
||||
: json.map((dynamic value) => InlineResponseDefault.fromJson(value)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, InlineResponseDefault> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, InlineResponseDefault>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) => map[key] = InlineResponseDefault.fromJson(v));
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) => map[key] = InlineResponseDefault.fromJson(value));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
@ -60,9 +60,9 @@ class InlineResponseDefault {
|
||||
// maps a json object with a list of InlineResponseDefault-objects as value to a dart map
|
||||
static Map<String, List<InlineResponseDefault>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<InlineResponseDefault>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = InlineResponseDefault.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) {
|
||||
map[key] = InlineResponseDefault.listFromJson(value, emptyIsNull: emptyIsNull, growable: growable,);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
|
@ -67,7 +67,7 @@ class MapTest {
|
||||
: MapTest(
|
||||
mapMapOfString: json[r'map_map_of_string'] == null
|
||||
? null
|
||||
: Map.mapFromJson(json[r'map_map_of_string']),
|
||||
: (json[r'map_map_of_string'] as Map).cast<String, Map>(),
|
||||
mapOfEnumString: json[r'map_of_enum_string'] == null ?
|
||||
null :
|
||||
(json[r'map_of_enum_string'] as Map).cast<String, String>(),
|
||||
@ -82,12 +82,12 @@ class MapTest {
|
||||
static List<MapTest> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <MapTest>[]
|
||||
: json.map((v) => MapTest.fromJson(v)).toList(growable: true == growable);
|
||||
: json.map((dynamic value) => MapTest.fromJson(value)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, MapTest> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, MapTest>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) => map[key] = MapTest.fromJson(v));
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) => map[key] = MapTest.fromJson(value));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
@ -95,9 +95,9 @@ class MapTest {
|
||||
// maps a json object with a list of MapTest-objects as value to a dart map
|
||||
static Map<String, List<MapTest>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<MapTest>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = MapTest.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) {
|
||||
map[key] = MapTest.listFromJson(value, emptyIsNull: emptyIsNull, growable: growable,);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
|
@ -61,20 +61,18 @@ class MixedPropertiesAndAdditionalPropertiesClass {
|
||||
dateTime: json[r'dateTime'] == null
|
||||
? null
|
||||
: DateTime.parse(json[r'dateTime']),
|
||||
map: json[r'map'] == null
|
||||
? null
|
||||
: Animal.mapFromJson(json[r'map']),
|
||||
map: json[r'map']
|
||||
);
|
||||
|
||||
static List<MixedPropertiesAndAdditionalPropertiesClass> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <MixedPropertiesAndAdditionalPropertiesClass>[]
|
||||
: json.map((v) => MixedPropertiesAndAdditionalPropertiesClass.fromJson(v)).toList(growable: true == growable);
|
||||
: json.map((dynamic value) => MixedPropertiesAndAdditionalPropertiesClass.fromJson(value)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, MixedPropertiesAndAdditionalPropertiesClass> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, MixedPropertiesAndAdditionalPropertiesClass>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) => map[key] = MixedPropertiesAndAdditionalPropertiesClass.fromJson(v));
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) => map[key] = MixedPropertiesAndAdditionalPropertiesClass.fromJson(value));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
@ -82,9 +80,9 @@ class MixedPropertiesAndAdditionalPropertiesClass {
|
||||
// maps a json object with a list of MixedPropertiesAndAdditionalPropertiesClass-objects as value to a dart map
|
||||
static Map<String, List<MixedPropertiesAndAdditionalPropertiesClass>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<MixedPropertiesAndAdditionalPropertiesClass>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = MixedPropertiesAndAdditionalPropertiesClass.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) {
|
||||
map[key] = MixedPropertiesAndAdditionalPropertiesClass.listFromJson(value, emptyIsNull: emptyIsNull, growable: growable,);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
|
@ -56,12 +56,12 @@ class Model200Response {
|
||||
static List<Model200Response> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <Model200Response>[]
|
||||
: json.map((v) => Model200Response.fromJson(v)).toList(growable: true == growable);
|
||||
: json.map((dynamic value) => Model200Response.fromJson(value)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, Model200Response> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, Model200Response>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) => map[key] = Model200Response.fromJson(v));
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) => map[key] = Model200Response.fromJson(value));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
@ -69,9 +69,9 @@ class Model200Response {
|
||||
// maps a json object with a list of Model200Response-objects as value to a dart map
|
||||
static Map<String, List<Model200Response>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<Model200Response>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = Model200Response.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) {
|
||||
map[key] = Model200Response.listFromJson(value, emptyIsNull: emptyIsNull, growable: growable,);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
|
@ -47,12 +47,12 @@ class ModelClient {
|
||||
static List<ModelClient> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <ModelClient>[]
|
||||
: json.map((v) => ModelClient.fromJson(v)).toList(growable: true == growable);
|
||||
: json.map((dynamic value) => ModelClient.fromJson(value)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, ModelClient> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, ModelClient>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) => map[key] = ModelClient.fromJson(v));
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) => map[key] = ModelClient.fromJson(value));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
@ -60,9 +60,9 @@ class ModelClient {
|
||||
// maps a json object with a list of ModelClient-objects as value to a dart map
|
||||
static Map<String, List<ModelClient>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<ModelClient>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = ModelClient.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) {
|
||||
map[key] = ModelClient.listFromJson(value, emptyIsNull: emptyIsNull, growable: growable,);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
|
@ -48,12 +48,12 @@ class ModelFile {
|
||||
static List<ModelFile> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <ModelFile>[]
|
||||
: json.map((v) => ModelFile.fromJson(v)).toList(growable: true == growable);
|
||||
: json.map((dynamic value) => ModelFile.fromJson(value)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, ModelFile> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, ModelFile>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) => map[key] = ModelFile.fromJson(v));
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) => map[key] = ModelFile.fromJson(value));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
@ -61,9 +61,9 @@ class ModelFile {
|
||||
// maps a json object with a list of ModelFile-objects as value to a dart map
|
||||
static Map<String, List<ModelFile>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<ModelFile>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = ModelFile.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) {
|
||||
map[key] = ModelFile.listFromJson(value, emptyIsNull: emptyIsNull, growable: growable,);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
|
@ -47,12 +47,12 @@ class ModelList {
|
||||
static List<ModelList> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <ModelList>[]
|
||||
: json.map((v) => ModelList.fromJson(v)).toList(growable: true == growable);
|
||||
: json.map((dynamic value) => ModelList.fromJson(value)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, ModelList> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, ModelList>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) => map[key] = ModelList.fromJson(v));
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) => map[key] = ModelList.fromJson(value));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
@ -60,9 +60,9 @@ class ModelList {
|
||||
// maps a json object with a list of ModelList-objects as value to a dart map
|
||||
static Map<String, List<ModelList>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<ModelList>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = ModelList.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) {
|
||||
map[key] = ModelList.listFromJson(value, emptyIsNull: emptyIsNull, growable: growable,);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
|
@ -47,12 +47,12 @@ class ModelReturn {
|
||||
static List<ModelReturn> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <ModelReturn>[]
|
||||
: json.map((v) => ModelReturn.fromJson(v)).toList(growable: true == growable);
|
||||
: json.map((dynamic value) => ModelReturn.fromJson(value)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, ModelReturn> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, ModelReturn>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) => map[key] = ModelReturn.fromJson(v));
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) => map[key] = ModelReturn.fromJson(value));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
@ -60,9 +60,9 @@ class ModelReturn {
|
||||
// maps a json object with a list of ModelReturn-objects as value to a dart map
|
||||
static Map<String, List<ModelReturn>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<ModelReturn>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = ModelReturn.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) {
|
||||
map[key] = ModelReturn.listFromJson(value, emptyIsNull: emptyIsNull, growable: growable,);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
|
@ -72,12 +72,12 @@ class Name {
|
||||
static List<Name> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <Name>[]
|
||||
: json.map((v) => Name.fromJson(v)).toList(growable: true == growable);
|
||||
: json.map((dynamic value) => Name.fromJson(value)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, Name> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, Name>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) => map[key] = Name.fromJson(v));
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) => map[key] = Name.fromJson(value));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
@ -85,9 +85,9 @@ class Name {
|
||||
// maps a json object with a list of Name-objects as value to a dart map
|
||||
static Map<String, List<Name>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<Name>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = Name.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) {
|
||||
map[key] = Name.listFromJson(value, emptyIsNull: emptyIsNull, growable: growable,);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
|
@ -144,26 +144,20 @@ class NullableClass {
|
||||
arrayNullableProp: Object.listFromJson(json[r'array_nullable_prop']),
|
||||
arrayAndItemsNullableProp: Object.listFromJson(json[r'array_and_items_nullable_prop']),
|
||||
arrayItemsNullable: Object.listFromJson(json[r'array_items_nullable']),
|
||||
objectNullableProp: json[r'object_nullable_prop'] == null
|
||||
? null
|
||||
: Object.mapFromJson(json[r'object_nullable_prop']),
|
||||
objectAndItemsNullableProp: json[r'object_and_items_nullable_prop'] == null
|
||||
? null
|
||||
: Object.mapFromJson(json[r'object_and_items_nullable_prop']),
|
||||
objectItemsNullable: json[r'object_items_nullable'] == null
|
||||
? null
|
||||
: Object.mapFromJson(json[r'object_items_nullable']),
|
||||
objectNullableProp: json[r'object_nullable_prop']
|
||||
objectAndItemsNullableProp: json[r'object_and_items_nullable_prop']
|
||||
objectItemsNullable: json[r'object_items_nullable']
|
||||
);
|
||||
|
||||
static List<NullableClass> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <NullableClass>[]
|
||||
: json.map((v) => NullableClass.fromJson(v)).toList(growable: true == growable);
|
||||
: json.map((dynamic value) => NullableClass.fromJson(value)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, NullableClass> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, NullableClass>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) => map[key] = NullableClass.fromJson(v));
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) => map[key] = NullableClass.fromJson(value));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
@ -171,9 +165,9 @@ class NullableClass {
|
||||
// maps a json object with a list of NullableClass-objects as value to a dart map
|
||||
static Map<String, List<NullableClass>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<NullableClass>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = NullableClass.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) {
|
||||
map[key] = NullableClass.listFromJson(value, emptyIsNull: emptyIsNull, growable: growable,);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
|
@ -49,12 +49,12 @@ class NumberOnly {
|
||||
static List<NumberOnly> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <NumberOnly>[]
|
||||
: json.map((v) => NumberOnly.fromJson(v)).toList(growable: true == growable);
|
||||
: json.map((dynamic value) => NumberOnly.fromJson(value)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, NumberOnly> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, NumberOnly>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) => map[key] = NumberOnly.fromJson(v));
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) => map[key] = NumberOnly.fromJson(value));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
@ -62,9 +62,9 @@ class NumberOnly {
|
||||
// maps a json object with a list of NumberOnly-objects as value to a dart map
|
||||
static Map<String, List<NumberOnly>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<NumberOnly>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = NumberOnly.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) {
|
||||
map[key] = NumberOnly.listFromJson(value, emptyIsNull: emptyIsNull, growable: growable,);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
|
@ -95,12 +95,12 @@ class Order {
|
||||
static List<Order> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <Order>[]
|
||||
: json.map((v) => Order.fromJson(v)).toList(growable: true == growable);
|
||||
: json.map((dynamic value) => Order.fromJson(value)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, Order> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, Order>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) => map[key] = Order.fromJson(v));
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) => map[key] = Order.fromJson(value));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
@ -108,9 +108,9 @@ class Order {
|
||||
// maps a json object with a list of Order-objects as value to a dart map
|
||||
static Map<String, List<Order>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<Order>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = Order.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) {
|
||||
map[key] = Order.listFromJson(value, emptyIsNull: emptyIsNull, growable: growable,);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
|
@ -67,12 +67,12 @@ class OuterComposite {
|
||||
static List<OuterComposite> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <OuterComposite>[]
|
||||
: json.map((v) => OuterComposite.fromJson(v)).toList(growable: true == growable);
|
||||
: json.map((dynamic value) => OuterComposite.fromJson(value)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, OuterComposite> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, OuterComposite>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) => map[key] = OuterComposite.fromJson(v));
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) => map[key] = OuterComposite.fromJson(value));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
@ -80,9 +80,9 @@ class OuterComposite {
|
||||
// maps a json object with a list of OuterComposite-objects as value to a dart map
|
||||
static Map<String, List<OuterComposite>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<OuterComposite>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = OuterComposite.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) {
|
||||
map[key] = OuterComposite.listFromJson(value, emptyIsNull: emptyIsNull, growable: growable,);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
|
@ -45,12 +45,12 @@ class OuterObjectWithEnumProperty {
|
||||
static List<OuterObjectWithEnumProperty> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <OuterObjectWithEnumProperty>[]
|
||||
: json.map((v) => OuterObjectWithEnumProperty.fromJson(v)).toList(growable: true == growable);
|
||||
: json.map((dynamic value) => OuterObjectWithEnumProperty.fromJson(value)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, OuterObjectWithEnumProperty> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, OuterObjectWithEnumProperty>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) => map[key] = OuterObjectWithEnumProperty.fromJson(v));
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) => map[key] = OuterObjectWithEnumProperty.fromJson(value));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
@ -58,9 +58,9 @@ class OuterObjectWithEnumProperty {
|
||||
// maps a json object with a list of OuterObjectWithEnumProperty-objects as value to a dart map
|
||||
static Map<String, List<OuterObjectWithEnumProperty>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<OuterObjectWithEnumProperty>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = OuterObjectWithEnumProperty.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) {
|
||||
map[key] = OuterObjectWithEnumProperty.listFromJson(value, emptyIsNull: emptyIsNull, growable: growable,);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
|
@ -91,12 +91,12 @@ class Pet {
|
||||
static List<Pet> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <Pet>[]
|
||||
: json.map((v) => Pet.fromJson(v)).toList(growable: true == growable);
|
||||
: json.map((dynamic value) => Pet.fromJson(value)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, Pet> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, Pet>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) => map[key] = Pet.fromJson(v));
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) => map[key] = Pet.fromJson(value));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
@ -104,9 +104,9 @@ class Pet {
|
||||
// maps a json object with a list of Pet-objects as value to a dart map
|
||||
static Map<String, List<Pet>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<Pet>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = Pet.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) {
|
||||
map[key] = Pet.listFromJson(value, emptyIsNull: emptyIsNull, growable: growable,);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
|
@ -56,12 +56,12 @@ class ReadOnlyFirst {
|
||||
static List<ReadOnlyFirst> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <ReadOnlyFirst>[]
|
||||
: json.map((v) => ReadOnlyFirst.fromJson(v)).toList(growable: true == growable);
|
||||
: json.map((dynamic value) => ReadOnlyFirst.fromJson(value)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, ReadOnlyFirst> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, ReadOnlyFirst>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) => map[key] = ReadOnlyFirst.fromJson(v));
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) => map[key] = ReadOnlyFirst.fromJson(value));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
@ -69,9 +69,9 @@ class ReadOnlyFirst {
|
||||
// maps a json object with a list of ReadOnlyFirst-objects as value to a dart map
|
||||
static Map<String, List<ReadOnlyFirst>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<ReadOnlyFirst>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = ReadOnlyFirst.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) {
|
||||
map[key] = ReadOnlyFirst.listFromJson(value, emptyIsNull: emptyIsNull, growable: growable,);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
|
@ -47,12 +47,12 @@ class SpecialModelName {
|
||||
static List<SpecialModelName> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <SpecialModelName>[]
|
||||
: json.map((v) => SpecialModelName.fromJson(v)).toList(growable: true == growable);
|
||||
: json.map((dynamic value) => SpecialModelName.fromJson(value)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, SpecialModelName> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, SpecialModelName>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) => map[key] = SpecialModelName.fromJson(v));
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) => map[key] = SpecialModelName.fromJson(value));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
@ -60,9 +60,9 @@ class SpecialModelName {
|
||||
// maps a json object with a list of SpecialModelName-objects as value to a dart map
|
||||
static Map<String, List<SpecialModelName>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<SpecialModelName>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = SpecialModelName.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) {
|
||||
map[key] = SpecialModelName.listFromJson(value, emptyIsNull: emptyIsNull, growable: growable,);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
|
@ -56,12 +56,12 @@ class Tag {
|
||||
static List<Tag> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <Tag>[]
|
||||
: json.map((v) => Tag.fromJson(v)).toList(growable: true == growable);
|
||||
: json.map((dynamic value) => Tag.fromJson(value)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, Tag> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, Tag>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) => map[key] = Tag.fromJson(v));
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) => map[key] = Tag.fromJson(value));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
@ -69,9 +69,9 @@ class Tag {
|
||||
// maps a json object with a list of Tag-objects as value to a dart map
|
||||
static Map<String, List<Tag>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<Tag>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = Tag.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) {
|
||||
map[key] = Tag.listFromJson(value, emptyIsNull: emptyIsNull, growable: growable,);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
|
@ -111,12 +111,12 @@ class User {
|
||||
static List<User> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <User>[]
|
||||
: json.map((v) => User.fromJson(v)).toList(growable: true == growable);
|
||||
: json.map((dynamic value) => User.fromJson(value)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, User> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, User>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) => map[key] = User.fromJson(v));
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) => map[key] = User.fromJson(value));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
@ -124,9 +124,9 @@ class User {
|
||||
// maps a json object with a list of User-objects as value to a dart map
|
||||
static Map<String, List<User>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<User>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = User.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) {
|
||||
map[key] = User.listFromJson(value, emptyIsNull: emptyIsNull, growable: growable,);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
|
@ -1,6 +1,7 @@
|
||||
.gitignore
|
||||
.travis.yml
|
||||
README.md
|
||||
analysis_options.yaml
|
||||
build.yaml
|
||||
doc/AdditionalPropertiesClass.md
|
||||
doc/Animal.md
|
||||
|
@ -0,0 +1,3 @@
|
||||
analyzer:
|
||||
strong-mode:
|
||||
implicit-casts: true
|
@ -61,7 +61,7 @@ class ApiClient {
|
||||
Future<Response> invokeAPI(
|
||||
String path,
|
||||
String method,
|
||||
Iterable<QueryParam> queryParams,
|
||||
List<QueryParam> queryParams,
|
||||
Object body,
|
||||
Map<String, String> headerParams,
|
||||
Map<String, String> formParams,
|
||||
@ -156,13 +156,13 @@ class ApiClient {
|
||||
List<QueryParam> queryParams,
|
||||
Map<String, String> headerParams,
|
||||
) {
|
||||
authNames.forEach((authName) {
|
||||
for(final authName in authNames) {
|
||||
final auth = _authentications[authName];
|
||||
if (auth == null) {
|
||||
throw ArgumentError('Authentication undefined: $authName');
|
||||
}
|
||||
auth.applyToParams(queryParams, headerParams);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user