You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When attempting to use polymorphism as described here in the specification controllers will contain import statements to models which have not been generated
openapi-generator version
Tested with 4.1.3, as well as snapshots of 4.2.1 and 5.0.0. Issue exists in all tested versions.
openapi_server/controllers/default_controller.py now contains the line from openapi_server.models.any_of_bar_baz import AnyOfBarBaz. AnyOfBarBaz is not a model which has been generated.
The text was updated successfully, but these errors were encountered:
Unfortunately the default codegen still doesn't support heterogeneous lists as of now, polymorphism itself works, even though not perfectly. I've seen lots of issues being related to the same problem (e.g. #15#500#2845#4239)
The branch improve_flatten also improves the generation of inhereted classes and removes generation of "bar_allOf.*" files, if they are a problem with your generator. Though it does not yet fix problems with anyOf Edit: branch doesn't exist anymore
Bug Report Checklist
Description
When attempting to use polymorphism as described here in the specification controllers will contain
import
statements to models which have not been generatedopenapi-generator version
Tested with 4.1.3, as well as snapshots of 4.2.1 and 5.0.0. Issue exists in all tested versions.
OpenAPI declaration file content or url
Command line used for generation
java -jar openapi-generator-cli-4.1.3.jar generate -g python-flask -i openapi.yml
Steps to reproduce
openapi_server/controllers/default_controller.py
now contains the linefrom openapi_server.models.any_of_bar_baz import AnyOfBarBaz
.AnyOfBarBaz
is not a model which has been generated.The text was updated successfully, but these errors were encountered: