Bug Report Checklist
Description
An import is generated that does not exist.
openapi-generator version
7.9.0
OpenAPI declaration file content or url
The code for the yaml spec can be found here: https://github.com/bbc/tams/tree/main/api
Generation Details
This is a snippet of the file it generates with the relevant to the issue imports:
from pydantic import ConfigDict, Field
from openapi_server.models.object import object
try:
from typing import Self
except ImportError:
from typing_extensions import Self
class MediaBucketObjectStore(object):
...
The issue is the imported object, which doesn't exist.
I believe the generated file should be this:
from pydantic import ConfigDict, Field, BaseModel
try:
from typing import Self
except ImportError:
from typing_extensions import Self
class MediaBucketObjectStore(BaseModel):
...
Steps to reproduce
build-server-local-fastapi:
docker run --user ${USER}:${GROUP} --rm \
-v ${PWD}:/local openapitools/openapi-generator-cli:v${GEN_VER} generate \
--additional-properties=apiNameSuffix=controller_impl \
-t /local/.templates/7.9.0/python_fastapi/.openapi-generator-server/ \
-i /local/openapi.yaml \
-g python-fastapi \
-o /local/python_fastapi/
Bug Report Checklist
Description
An import is generated that does not exist.
openapi-generator version
7.9.0
OpenAPI declaration file content or url
The code for the yaml spec can be found here: https://github.com/bbc/tams/tree/main/api
Generation Details
This is a snippet of the file it generates with the relevant to the issue imports:
The issue is the imported
object, which doesn't exist.I believe the generated file should be this:
Steps to reproduce