Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] [Dart] Map<String,List<int>> wrong deserialization #19997

Open
escamoteur opened this issue Oct 30, 2024 · 0 comments
Open

[BUG] [Dart] Map<String,List<int>> wrong deserialization #19997

escamoteur opened this issue Oct 30, 2024 · 0 comments

Comments

@escamoteur
Copy link

Description

this open-api spech part:

      "CollectionCalendarDto": {
        "type": "object",
        "properties": {
          "calendar": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "integer"
              }
            }
          },

generates correctly the property

  Map<String, List<int>> calendar;

but the fromJson method is wrong:

      return CollectionCalendarDto(
        calendar: json[r'calendar'] == null
            ? const {}
            : mapCastOfType<String, List>(json, r'calendar'),
        mostWornWatch: WatchTinyDto.fromJson(json[r'most_worn_watch']),
      );

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant