OpenAPITools / OpenAPITools/openapi-generator

[BUG][dart] syntax error when deserializing JSON into a list

Open
#12,305 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Issue: Bug
Dominant language
Java
Stars
26.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

This issue exists when generating the Twitter API

https://api.twitter.com/2/openapi.json

openapi.json.zip

openapi-generator-cli 5.4.0
  commit : 4a36be7
  built  : 2022-01-31T05:31:36Z
  source : https://github.com/openapitools/openapi-generator
  docs   : https://openapi-generator.tech/
openapi-generator generate -i spec.json -g dart -o dart_client
Screen Shot 2022-05-06 at 9 17 15 PM

Related to:

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with openapi.json using openapi-generator-cli 5.4.0 and the dart generator, then inspect the generated dart_client output for the list deserialization syntax error. Compare the behavior with related issue #2567 and pull request #6913. Done means the Twitter API spec generates syntactically valid Dart that can deserialize JSON lists.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, openapi
Domain
api, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.