Signed-off-by: Jess Frazelle <github@jessfraz.com>
This commit is contained in:
Jess Frazelle
2022-06-11 18:08:23 -07:00
parent 7c4321306a
commit 73cb3ff917
6 changed files with 23 additions and 15 deletions

View File

@ -863,7 +863,9 @@ def generateObjectType(path: str, name: str, schema: dict, type_name: str):
property_type = property_type.replace(
'#/components/schemas/', '')
f.write(
"\tfrom ..models import " +
"\tfrom ..models." +
camel_to_snake(property_type) +
" import " +
property_type +
"\n")
elif 'type' in property_schema['items']:
@ -979,7 +981,9 @@ def generateObjectType(path: str, name: str, schema: dict, type_name: str):
property_type = property_type.replace(
'#/components/schemas/', '')
f.write(
"\t\tfrom ..models import " +
"\t\tfrom ..models." +
camel_to_snake(property_type) +
" import " +
property_type +
"\n")
elif 'type' in property_schema['items']:
@ -1146,7 +1150,9 @@ def generateObjectType(path: str, name: str, schema: dict, type_name: str):
property_type = property_type.replace(
'#/components/schemas/', '')
f.write(
"\t\tfrom ..models import " +
"\t\tfrom ..models." +
camel_to_snake(property_type) +
" import " +
property_type +
"\n")
elif 'type' in property_schema['items']: