-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathendpoint_args.handlebars
85 lines (85 loc) · 2.48 KB
/
endpoint_args.handlebars
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
self,
{{#if bodyParam}}
{{#with bodyParam}}
body: typing.Union[{{#each content}}{{#with this.schema}}{{baseName}},{{> model_templates/schema_python_types }}{{/with}}{{/each}}{{#unless required}}schemas.Unset] = schemas.unset{{else}}]{{/unless}},
{{/with}}
{{/if}}
{{#if queryParams}}
query_params: RequestQueryParams = frozendict.frozendict(),
{{/if}}
{{#if headerParams}}
header_params: RequestHeaderParams = frozendict.frozendict(),
{{/if}}
{{#if pathParams}}
path_params: RequestPathParams = frozendict.frozendict(),
{{/if}}
{{#if cookieParams}}
cookie_params: RequestCookieParams = frozendict.frozendict(),
{{/if}}
{{#with bodyParam}}
{{#each content}}
{{#if @first}}
content_type: str = '{{{@key}}}',
{{/if}}
{{/each}}
{{/with}}
{{#if produces}}
accept_content_types: typing.Tuple[str] = _all_accept_content_types,
{{/if}}
{{#if servers}}
host_index: typing.Optional[int] = None,
{{/if}}
stream: bool = False,
timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
{{#if isOverload}}
{{#eq skipDeserialization "True"}}
skip_deserialization: typing_extensions.Literal[True] = True,
{{/eq}}
{{#eq skipDeserialization "False"}}
skip_deserialization: typing_extensions.Literal[False] = False,
{{/eq}}
{{#eq skipDeserialization "null"}}
skip_deserialization: bool = False,
{{/eq}}
{{else}}
skip_deserialization: bool = False,
{{/if}}
{{#eq skipDeserialization "True"}}
) -> api_client.ApiResponseWithoutDeserialization:
{{/eq}}
{{#eq skipDeserialization "False"}}
) -> typing.Union[{{#each responses}}{{#if isDefault}}ApiResponseForDefault,{{else}}{{#if is2xx}}ApiResponseFor{{code}},{{/if}}{{/if}}{{/each}}api_client.ApiResponse]:
{{/eq}}
{{#eq skipDeserialization "null"}}
{{#if isOverload}}
) -> typing.Union[
{{#each responses}}
{{#if isDefault}}
ApiResponseForDefault,
{{else}}
{{#if is2xx}}
ApiResponseFor{{code}},
{{/if}}
{{/if}}
{{/each}}
api_client.ApiResponseWithoutDeserialization,
]:
{{else}}
) -> typing.Union[
{{#each responses}}
{{#if isDefault}}
ApiResponseForDefault,
{{else}}
{{#if is2xx}}
ApiResponseFor{{code}},
{{/if}}
{{/if}}
{{/each}}
api_client.ApiResponse,
api_client.ApiResponseWithoutDeserialization,
]:
{{/if}}
{{/eq}}
{{#if isOverload}}
...
{{/if}}