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 generating code for python-flask, the generated YAML spec does not include types for nested components. Unclear if this generation problem is specific to python-flask (seems to be a more generic issue with YAML generation), but it causes automatic validation to fail when passing these types to the Flask server in a request.
Notice that the generated Parent_child component has no type. This causes it to fail with Body property 'child' not defined in body schema when passing a Parent object via request body.
Adding type: object to the Parent_child definition causes things to work properly.
The text was updated successfully, but these errors were encountered:
Bug Report Checklist
Description
When generating code for python-flask, the generated YAML spec does not include types for nested components. Unclear if this generation problem is specific to python-flask (seems to be a more generic issue with YAML generation), but it causes automatic validation to fail when passing these types to the Flask server in a request.
openapi-generator version
4.0.0-beta
OpenAPI declaration file content or url
Command line used for generation
Steps to reproduce
After running the generator command, the generated file
gen/openapi_server/openapi/openapi.yaml
contains these component definitions:Notice that the generated
Parent_child
component has no type. This causes it to fail withBody property 'child' not defined in body schema
when passing aParent
object via request body.Adding
type: object
to theParent_child
definition causes things to work properly.The text was updated successfully, but these errors were encountered: