@ -273,7 +273,12 @@ response: Response[""" + success_type + """] = await """ + fn_name + """.asyncio
|
||||
responses = endpoint['responses']
|
||||
for response_code in responses:
|
||||
response = responses[response_code]
|
||||
f.write("\tif response.status_code == " + response_code.replace("XX", "00") + ":\n")
|
||||
f.write(
|
||||
"\tif response.status_code == " +
|
||||
response_code.replace(
|
||||
"XX",
|
||||
"00") +
|
||||
":\n")
|
||||
if 'content' in response:
|
||||
content = response['content']
|
||||
for content_type in content:
|
||||
@ -1201,12 +1206,24 @@ def getRequestBodyType(endpoint: dict) -> str:
|
||||
|
||||
def camel_to_snake(name: str):
|
||||
name = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', name)
|
||||
return re.sub('([a-z0-9])([A-Z])', r'\1_\2', name).lower().replace('-', '_')
|
||||
return re.sub(
|
||||
'([a-z0-9])([A-Z])',
|
||||
r'\1_\2',
|
||||
name).lower().replace(
|
||||
'-',
|
||||
'_')
|
||||
|
||||
|
||||
def camel_to_screaming_snake(name: str):
|
||||
name = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', name)
|
||||
return re.sub('([a-z0-9])([A-Z])', r'\1_\2', name).replace(' ', '').upper().replace('-', '_')
|
||||
return re.sub(
|
||||
'([a-z0-9])([A-Z])',
|
||||
r'\1_\2',
|
||||
name).replace(
|
||||
' ',
|
||||
'').upper().replace(
|
||||
'-',
|
||||
'_')
|
||||
|
||||
|
||||
if (__name__ == '__main__'):
|
||||
|
@ -6,6 +6,7 @@ from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="ApiCallQueryGroup")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class ApiCallQueryGroup:
|
||||
""" """
|
||||
@ -35,7 +36,6 @@ class ApiCallQueryGroup:
|
||||
|
||||
query = d.pop("query", UNSET)
|
||||
|
||||
|
||||
api_call_query_group = cls(
|
||||
count=count,
|
||||
query=query,
|
||||
|
@ -1,5 +1,6 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class ApiCallQueryGroupBy(str, Enum):
|
||||
EMAIL = 'email'
|
||||
METHOD = 'method'
|
||||
|
@ -11,6 +11,7 @@ from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="ApiCallWithPrice")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class ApiCallWithPrice:
|
||||
""" """
|
||||
@ -210,7 +211,6 @@ class ApiCallWithPrice:
|
||||
|
||||
user_id = d.pop("user_id", UNSET)
|
||||
|
||||
|
||||
api_call_with_price = cls(
|
||||
completed_at=completed_at,
|
||||
created_at=created_at,
|
||||
|
@ -9,6 +9,7 @@ from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="ApiToken")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class ApiToken:
|
||||
""" """
|
||||
@ -83,7 +84,6 @@ class ApiToken:
|
||||
|
||||
user_id = d.pop("user_id", UNSET)
|
||||
|
||||
|
||||
api_token = cls(
|
||||
created_at=created_at,
|
||||
id=id,
|
||||
|
@ -1,5 +1,6 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class CreatedAtSortMode(str, Enum):
|
||||
CREATED_AT_ASCENDING = 'created-at-ascending'
|
||||
CREATED_AT_DESCENDING = 'created-at-descending'
|
||||
|
@ -6,6 +6,7 @@ from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="Error")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class Error:
|
||||
""" """
|
||||
@ -41,7 +42,6 @@ class Error:
|
||||
|
||||
request_id = d.pop("request_id", UNSET)
|
||||
|
||||
|
||||
error = cls(
|
||||
error_code=error_code,
|
||||
message=message,
|
||||
|
@ -8,6 +8,7 @@ from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="ExtendedUser")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class ExtendedUser:
|
||||
""" """
|
||||
@ -142,7 +143,6 @@ class ExtendedUser:
|
||||
|
||||
zendesk_id = d.pop("zendesk_id", UNSET)
|
||||
|
||||
|
||||
extended_user = cls(
|
||||
company=company,
|
||||
created_at=created_at,
|
||||
|
@ -12,6 +12,7 @@ from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="FileConversion")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class FileConversion:
|
||||
""" """
|
||||
@ -157,7 +158,6 @@ class FileConversion:
|
||||
|
||||
worker = d.pop("worker", UNSET)
|
||||
|
||||
|
||||
file_conversion = cls(
|
||||
completed_at=completed_at,
|
||||
created_at=created_at,
|
||||
|
@ -1,5 +1,6 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class FileConversionOutputFormat(str, Enum):
|
||||
STL = 'stl'
|
||||
OBJ = 'obj'
|
||||
|
@ -1,5 +1,6 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class FileConversionSourceFormat(str, Enum):
|
||||
STL = 'stl'
|
||||
OBJ = 'obj'
|
||||
|
@ -1,5 +1,6 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class FileConversionStatus(str, Enum):
|
||||
QUEUED = 'Queued'
|
||||
UPLOADED = 'Uploaded'
|
||||
|
@ -12,6 +12,7 @@ from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="FileConversionWithOutput")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class FileConversionWithOutput:
|
||||
""" """
|
||||
@ -132,7 +133,6 @@ class FileConversionWithOutput:
|
||||
|
||||
user_id = d.pop("user_id", UNSET)
|
||||
|
||||
|
||||
file_conversion_with_output = cls(
|
||||
completed_at=completed_at,
|
||||
created_at=created_at,
|
||||
|
@ -1,5 +1,6 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class Method(str, Enum):
|
||||
OPTIONS = 'OPTIONS'
|
||||
GET = 'GET'
|
||||
|
@ -6,6 +6,7 @@ from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="Pong")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class Pong:
|
||||
""" """
|
||||
@ -29,7 +30,6 @@ class Pong:
|
||||
d = src_dict.copy()
|
||||
message = d.pop("message", UNSET)
|
||||
|
||||
|
||||
pong = cls(
|
||||
message=message,
|
||||
)
|
||||
|
@ -8,6 +8,7 @@ from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="User")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class User:
|
||||
""" """
|
||||
@ -124,7 +125,6 @@ class User:
|
||||
else:
|
||||
updated_at = isoparse(_updated_at)
|
||||
|
||||
|
||||
user = cls(
|
||||
company=company,
|
||||
created_at=created_at,
|
||||
|
Reference in New Issue
Block a user