[REQ][dart] Dart full OAS3 support
See original GitHub issueThis 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 asjava.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 callObject.mapFromJson
- OAS3 fake petstore contains a model called
Client
, this conflict withhttp.Client
(addressed by https://github.com/OpenAPITools/openapi-generator/pull/8198)
Dart-Dio:
- Compile errors regarding header parameters of type
bool
andList
, basically everything that is not aString
(addressed by #8191)
Issue Analytics
- State:
- Created 3 years ago
- Reactions:6
- Comments:18 (17 by maintainers)
Top Results From Across the Web
[DART] Add null-safety for dart 2.12+ #8278 - GitHub
Starting with DART 2.12 dart packages support sound null-safety making ... We first need to ensure OAS3 nullable/required work correctly and ...
Read more >Documentation for the dart Generator
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. true: Keep the old (incorrect) behaviour ...
Read more >OpenAPI Specification - Version 3.0.3 - Swagger
Tooling which supports OAS 3.0 SHOULD be compatible with all OAS 3.0. ... is appended to the URL from the Server Object in...
Read more >OAS 3.0 Full API Lifecycle Support with Anypoint Platform
Today, we are excited to announce the introduction of OpenAPI Specification 3.0 support across the full API lifecycle with Anypoint ...
Read more >Accelerate Flutter development with OpenAPI and Dart code ...
Run Flutter app and the back-end service example. If you like the tutorial above and would like to try the full example with...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@kuhnroyal I’ve downloaded the latest master (this project could suggest a clone with depth=1 btw) and built the package… it fixed some issues (inline enum probably), but still it had problems, so I fixed them for myself.
Here’s my commit https://github.com/Grohden/openapi-generator/commit/72c8e1531198e595e116d811173d2f2a6d558983, maybe I will open a PR later… but all those fixes were for my project and I can’t guarantee that all those casts will work (I’ve tested a single method in runtime and it worked)
In any case the project wasn’t even compiling without them, so it’s better than nothing.
Edit: had to ammend a change in the commit, I’ve update its URL
@Grohden If you have specific solutions to the some of the json mapping problems, please don’t hesitate to post them here. The dart generator is not my primary focus so any help is appreciated.