Open al3ad opened 1 day ago
thanks for reporting the issue.
can you please test it with the python client generator as well to see if there are similar import issues?
please also use v7.10.0 which is the latest stable version released a few days ago.
Hi, can confirm that this issue still persists with the difference of if in 7.9.0 the generated file is:
# coding: utf-8
from fastapi.testclient import TestClient
from openapi_server.models.collection_item import CollectionItem # noqa: F401
#from openapi_server.models.one_of_video_flow_audio_flow_data_flow_multi_essence_flow import OneOfVideoFlowAudioFlowDataFlowMultiEssenceFlow # noqa: F401
from openapi_server.models.unknownbasetype import UNKNOWN_BASE_TYPE # noqa: F401
def test_flows_created_post(client: TestClient):
"""Test case for flows_created_post
"""
unknown_base_type = openapi_server.UNKNOWN_BASE_TYPE()
then in 7.10.0 it's:
# coding: utf-8
from typing import ClassVar, Dict, List, Tuple # noqa: F401
from openapi_server.models.collection_item import CollectionItem
from openapi_server.models.one_of_video_flow_audio_flow_data_flow_multi_essence_flow import OneOfVideoFlowAudioFlowDataFlowMultiEssenceFlow
from openapi_server.models.unknownbasetype import UNKNOWN_BASE_TYPE
class BaseDefaultControllerImpl:
subclasses: ClassVar[Tuple] = ()
def __init_subclass__(cls, **kwargs):
super().__init_subclass__(**kwargs)
BaseDefaultControllerImpl.subclasses = BaseDefaultControllerImpl.subclasses + (cls,)
async def flows_created_post(
self,
unknown_base_type: ,
) -> None:
...
Thanks for the reply, @wing328
Bug Report Checklist
Description
Generated files have an unknown_base_type import.
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
tests/test_default_controller_impl
:Steps to reproduce