Carapacik / swagger_parser

Dart package that takes an OpenApi definition file and generates REST clients based on retrofit and data classes for your project.
https://pub.dev/packages/swagger_parser
MIT License
87 stars 33 forks source link

The object type in swagger should be converted into dynamic Map object #214

Closed MsProfanum closed 1 month ago

MsProfanum commented 3 months ago

If the parameter in the swagger API has a type "object" it is converted by the parser into separate class instead of the dynamic Map or, ideally, Map<String, NestedObject> (with NestedObject being an object that is in the "$ref" of the "additionalProperties" json).

StarProxima commented 1 month ago

@MsProfanum Hi

Converting any object to a map is not a good idea, because it can be a list or a primitive. Map support with additionalProperties should work correctly. Can you check this with your examples?