Open escamoteur opened 3 weeks ago
ok it turns out this sort of deep cast doesn't work see https://forum.itsallwidgets.com/t/problem-casting-json-propert-to-map-string-list-int/738/7?u=escamoteur
the correct line that would work is:
return CollectionCalendarDto(
calendar: json[r'calendar'] == null
? const {}
: (json['calendar'] as Map<String, dynamic>).map(
(key, value) => MapEntry(key, (value as List).cast<int>())),
Description
this open-api spech part:
generates correctly the property
but the
fromJson
method is wrong:the
int
is missing and as this is a required type it should have a trailing!
openapi-generator version
OpenAPI declaration file content or url
Generation Details
Steps to reproduce
Related issues/PRs
Suggest a fix