[BUG] [dart-dio] No builder factory for BuiltMap<String, JsonObject>
See original GitHub issueDescription
When describing an object whose type is a List<Dictionary<string, object>> dart-dio fails to generate a proper serializor prompting an exception
Deserializing '[a.b, 123]' to 'BuiltMap<String, JsonObject>' failed due to: Bad state: No builder factory for BuiltMap<String, JsonObject>. Fix by adding one, see SerializersBuilder.addBuilderFactory.
openapi-generator version
"@openapitools/openapi-generator-cli": "~1.0.13-4.3.1"
OpenAPI declaration file content or url
"ModelThatFails": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": {
"type": "object",
"additionalProperties": false
}
},
"nullable": true
}
},
"additionalProperties": false
},
Command line used for generation
Options besides this only include the swagger file location and package name/version.
openapi-generator generate --enable-post-process-file -o headset_mobile_api
Steps to reproduce
Include that model and generate the dart code. Try and deserialize it with this example input
'[a.b, 123]'
Related issues/PRs
Suggest a fix
It seems the issue is within the Built_Value serializor or the Model that got generated. Not too knowledgeable in mustache templating
Issue Analytics
- State:
- Created 3 years ago
- Comments:11 (6 by maintainers)
Top Results From Across the Web
No results found
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
OK I have it, in my case I need to add:
I guess it should be part of the “default” build.
Could you guys try the fix from the PR branch please.