OpenAPITools / OpenAPITools/openapi-generator

[REQ][dart] Dart full OAS3 support

Open
#8,179 18 comments 8 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Client: Dart Enhancement: Feature
Dominant language
Java
Stars
26.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

This is an epic to track remaining work for full dart/dart-dio OAS3 support.

General:

  • OAS3 fake petstore contains a model called File. This is generated as a separate model in the Go client but as java.io.File in Java/Kotlin. It should probably be a separate model. Currently this leads to compile errors. (addressed by https://github.com/OpenAPITools/openapi-generator/pull/8198)

Dart:

  • There are problems regarding deserialization of maps, de-serialization code is trying to call Map.mapFromJson. There are open issues for this and the problem is now evident in the generated fake petstore.
    Related issues: https://github.com/OpenAPITools/openapi-generator/issues/8029
  • De-serialization of maps of maps e.g. Map<String, Map<String, String>>
  • De-serialization of maps of enums e.g. Map<String, Enum>
  • De-serialization of list of list of model e.g. List<List<ReadOnlyFirst>>
  • Support enums of type double, de-serialization via switch statement doesn't work here
  • De-serialization of List<Object> tries to call Object.mapFromJson
  • OAS3 fake petstore contains a model called Client, this conflict with http.Client (addressed by https://github.com/OpenAPITools/openapi-generator/pull/8198)

Dart-Dio:

  • Compile errors regarding header parameters of type bool and List, basically everything that is not a String (addressed by #8191)

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

Start with the generated OAS3 fake petstore and issue #8029, reproducing the remaining Dart deserialization cases listed here: nested maps, maps of enums, nested model lists, double enums, and List. Done means the generated Dart and Dart-Dio clients handle those cases without invalid deserialization calls or compile errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart
Domain
api, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.