OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
Generate a Python client library using the command line above.
Note that output/openapi_client/models/map.py is created, containing a class Map.
Note that output/openapi_client/api/default_api.py tries to import the non-existing class Dict from the non-existing module openapi_client.models.dict instead.
Related issues/PRs
Suggest a fix
It seems that the type map is mapped twice in AbstractPythonCodegen.java. Once on lines 712-715 and again on lines 742-747. I don't know what the expected behavior is supposed to be, but this does not seem right.
Bug Report Checklist
Description
Referencing a schema component named
map
makes openapi-generator generate incorrect Python code for API calls using that component.openapi-generator version
7.8.0 and SNAPSHOT 7.9.0-20240922.165752-71
OpenAPI declaration file content or url
Generation Details
java -jar openapi-generator-cli.jar generate -g python -i openapi.yaml -o output
Steps to reproduce
Map
.Dict
from the non-existing moduleopenapi_client.models.dict
instead.Related issues/PRs
Suggest a fix
It seems that the type
map
is mapped twice inAbstractPythonCodegen.java
. Once on lines 712-715 and again on lines 742-747. I don't know what the expected behavior is supposed to be, but this does not seem right.