dart2-v3template._array_from_json.mustache Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of openapi-dart-generator Show documentation
Show all versions of openapi-dart-generator Show documentation
dart2 generator from openapi 3.x spec files.
{{#items}}
{{#isArray}}
(data as List).map((data) { ((dynamic data) { return {{>_from_json}};})(data); }).toList()
{{/isArray}}
{{#isMap}}
(data as List).map((data) { ((dynamic data) { return {{>_from_json}};})(data); }).toList()
{{/isMap}}
{{^items}}
{{#isEnum}}
{{enumName}}Extension.listFromJson(data)
{{/isEnum}}
{{#isDateTime}}
openApiDateTimeList(data)
{{/isDateTime}}
{{#isDate}}
openApiDateTimeList(data)
{{/isDate}}
{{#isModel}}
{{complexType}}.listFromJson(data)
{{/isModel}}
{{#isPrimitiveType}}
data?.cast<{{{dataType}}}>()
{{/isPrimitiveType}}
{{/items}}
{{/items}}