@ -743,6 +743,10 @@ def generateType(path: str, name: str, schema: dict):
|
||||
property_type = property_schema['items']['$ref']
|
||||
property_type = property_type.replace(
|
||||
'#/components/schemas/', '')
|
||||
f.write(
|
||||
"\tfrom ..models import " +
|
||||
property_type +
|
||||
"\n")
|
||||
elif 'type' in property_schema['items']:
|
||||
if property_schema['items']['type'] == 'string':
|
||||
property_type = 'str'
|
||||
@ -754,10 +758,6 @@ def generateType(path: str, name: str, schema: dict):
|
||||
print(" array: ", [property_schema['items']])
|
||||
raise Exception("Unknown array type")
|
||||
|
||||
f.write(
|
||||
"\tfrom ..models import " +
|
||||
property_type +
|
||||
"\n")
|
||||
f.write(
|
||||
"\t" +
|
||||
property_name +
|
||||
@ -859,6 +859,10 @@ def generateType(path: str, name: str, schema: dict):
|
||||
property_type = property_schema['items']['$ref']
|
||||
property_type = property_type.replace(
|
||||
'#/components/schemas/', '')
|
||||
f.write(
|
||||
"\t\tfrom ..models import " +
|
||||
property_type +
|
||||
"\n")
|
||||
elif 'type' in property_schema['items']:
|
||||
if property_schema['items']['type'] == 'string':
|
||||
property_type = 'str'
|
||||
@ -870,10 +874,6 @@ def generateType(path: str, name: str, schema: dict):
|
||||
print(" array: ", [property_schema['items']])
|
||||
raise Exception("Unknown array type")
|
||||
|
||||
f.write(
|
||||
"\t\tfrom ..models import " +
|
||||
property_type +
|
||||
"\n")
|
||||
f.write(
|
||||
"\t\t" +
|
||||
property_name +
|
||||
@ -1026,6 +1026,10 @@ def generateType(path: str, name: str, schema: dict):
|
||||
property_type = property_schema['items']['$ref']
|
||||
property_type = property_type.replace(
|
||||
'#/components/schemas/', '')
|
||||
f.write(
|
||||
"\t\tfrom ..models import " +
|
||||
property_type +
|
||||
"\n")
|
||||
elif 'type' in property_schema['items']:
|
||||
if property_schema['items']['type'] == 'string':
|
||||
property_type = 'str'
|
||||
@ -1038,10 +1042,6 @@ def generateType(path: str, name: str, schema: dict):
|
||||
print(" array: ", [property_schema['items']])
|
||||
raise Exception("Unknown array type")
|
||||
|
||||
f.write(
|
||||
"\t\tfrom ..models import " +
|
||||
property_type +
|
||||
"\n")
|
||||
f.write(
|
||||
"\t\t" +
|
||||
property_name +
|
||||
|
@ -15,7 +15,6 @@ class Cluster:
|
||||
cluster_port: Union[Unset, int] = UNSET
|
||||
name: Union[Unset, str] = UNSET
|
||||
tls_timeout: Union[Unset, int] = UNSET
|
||||
from ..models import str
|
||||
urls: Union[Unset, List[str]] = UNSET
|
||||
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
@ -26,7 +25,6 @@ class Cluster:
|
||||
cluster_port = self.cluster_port
|
||||
name = self.name
|
||||
tls_timeout = self.tls_timeout
|
||||
from ..models import str
|
||||
urls: Union[Unset, List[str]] = UNSET
|
||||
if not isinstance(self.urls, Unset):
|
||||
urls = self.urls
|
||||
@ -62,7 +60,6 @@ class Cluster:
|
||||
|
||||
tls_timeout = d.pop("tls_timeout", UNSET)
|
||||
|
||||
from ..models import str
|
||||
urls = cast(List[str], d.pop("urls", UNSET))
|
||||
|
||||
cluster = cls(
|
||||
|
Reference in New Issue
Block a user