Bug Report Checklist
Description
I have some components that contain dicts of dicts. With the default templates the generator doesn't generate valid python-code for these components.
Here is the generated code: https://gist.github.com/ottmar-zittlau/9d2d98ffd9b29c3bcb34b9e947228354
Some bugs:
Here the class on which from_dict is called is a type.
"array_of_dictionaries": [Dict[str, Vector3d].from_dict(_item) for _item in obj["array_of_dictionaries"]] if obj.get("array_of_dictionaries") is not None else None,
Here _item_array_of_dictionaries is a dictionary that doesn't have a to_dict method.
if self.array_of_dictionaries:
for _item_array_of_dictionaries in self.array_of_dictionaries:
if _item_array_of_dictionaries:
_items.append(_item_array_of_dictionaries.to_dict())
_dict['array_of_dictionaries'] = _items
openapi-generator version
7.16.0
OpenAPI declaration file content or url
https://gist.github.com/ottmar-zittlau/2e2a5357b1d1e60d41a2aef4ee6bde14
Generation Details
I generated code for python.
Steps to reproduce
Run
./openapi-generator-cli generate --generator-name python --input-spec openapi.yaml --output generated --package-name example
Related issues/PRs
Suggest a fix
I already have adapted the model_generic.mustache template file to deal with this, but before opening a merge request I wanted to know if this bug is known and whether there is already work going on to fix it.
Bug Report Checklist
Description
I have some components that contain dicts of dicts. With the default templates the generator doesn't generate valid python-code for these components.
Here is the generated code: https://gist.github.com/ottmar-zittlau/9d2d98ffd9b29c3bcb34b9e947228354
Some bugs:
Here the class on which
from_dictis called is a type.Here
_item_array_of_dictionariesis a dictionary that doesn't have ato_dictmethod.openapi-generator version
7.16.0
OpenAPI declaration file content or url
https://gist.github.com/ottmar-zittlau/2e2a5357b1d1e60d41a2aef4ee6bde14
Generation Details
I generated code for python.
Steps to reproduce
Run
Related issues/PRs
Suggest a fix
I already have adapted the model_generic.mustache template file to deal with this, but before opening a merge request I wanted to know if this bug is known and whether there is already work going on to fix it.