Skip to content

[DART] Fix 2d list generated deserialization#6913

Merged
wing328 merged 1 commit intoOpenAPITools:masterfrom
wbt-solutions:fix-2d-list-dart
Jul 30, 2020
Merged

[DART] Fix 2d list generated deserialization#6913
wing328 merged 1 commit intoOpenAPITools:masterfrom
wbt-solutions:fix-2d-list-dart

Conversation

@sbu-WBT
Copy link
Contributor

@sbu-WBT sbu-WBT commented Jul 12, 2020

This PR fixes the fromJson method for classes with nested lists like List<List<>>. Thus it fixes #2567.
I know the fix is not perfect. The generation will probably break with List<List<List<>>> and more dimensions. For fixing this I don't see any easy solution. Feel free to comment ideas into this direction.

PR checklist

  • Read the contribution guidelines.
  • If contributing template-only or documentation-only changes which will change sample output, build the project beforehand.
  • Run the shell script ./bin/generate-samples.shto update all Petstore samples related to your fix. This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master. These must match the expectations made by your contribution. You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example ./bin/generate-samples.sh bin/config/java*. For Windows users, please run the script in Git BASH.
  • File the PR against the correct branch: master
  • Copy the technical committee to review the pull request if your PR is targeting a particular programming language.

@ircecho (2017/07) @swipesight (2018/09) @jaumard (2018/09) @athornz (2019/12) @amondnet (2019/12)

@wing328
Copy link
Member

wing328 commented Jul 30, 2020

https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml has model definitions that use 2D arrays. We can add some tests later when dart2 is ready to use fake petstore spec.

@wing328 wing328 merged commit 472ff9c into OpenAPITools:master Jul 30, 2020
@wing328 wing328 added this to the 5.0.0 milestone Jul 30, 2020
@sbu-WBT sbu-WBT deleted the fix-2d-list-dart branch August 9, 2020 18:22
@wing328 wing328 changed the title [DART] Fix 2d list generated deserilization [DART] Fix 2d list generated deserialization Sep 2, 2020
@lukepighetti
Copy link

This issue still exists today, creating new ticket here: #12305

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG][Dart] Syntax error when generating array of arrays

3 participants