OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
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):
...
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