Open kj4tmp opened 5 months ago
I've reproduced this issue locally: missing imports with latest and latest-release and no error with version 7.5.0.
I'm also seeing this issue in 7.7.0 and 7.9.0 (and I think I also had it with 7.5.0.)
I was generating an async version of the ory-client
package and across the whole codebase there was only a single missing import (HealthStatus in metadata_api.py). (I also see the same issue using the urllib3
library flavour.)
It appears to me that this is affecting response types that only need to be imported because they're being used in a type hint.
Bug Report Checklist
Description
docker image openapitools/openapi-generator-cli:v7.5.0 is OK docker image openapitools/openapi-generator-cli:latest is BAD docker image openapitools/openapi-generator-cli:latest-release is BAD
Imports for response models are missing from the generated class definition in python.
v7.5.0 OK example:
In the OK example, notice that
SingleCommanderLockStateResponseModel
is imported.Here is the bad example (versions after v7.5.0)
notice that in the BAD example, the
SingleCommanderLockStateResponseModel
is not imported, and produces the following error on import:openapi-generator version
docker image openapitools/openapi-generator-cli:v7.5.0 is OK docker image openapitools/openapi-generator-cli:latest is BAD docker image openapitools/openapi-generator-cli:latest-release is BAD
OpenAPI declaration file content or url
Generation Details
OK generation
BAD generation:
my openapi generator config yaml looks like this
Steps to reproduce
Related issues/PRs
Suggest a fix