This repository was archived by the owner on Dec 25, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathendpoint_args.handlebars
More file actions
94 lines (94 loc) · 2.67 KB
/
endpoint_args.handlebars
File metadata and controls
94 lines (94 loc) · 2.67 KB
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
86
87
88
89
90
91
92
93
94
self,
{{#if bodyParam}}
{{#if bodyParam.required}}
{{#with bodyParam}}
body: typing.Union[{{#each content}}{{#with this.schema}}{{baseName}},{{> model_templates/schema_python_types }}{{/with}}{{/each}}],
{{/with}}
{{#if isOverload}}
{{#eq skipDeserialization "True"}}
skip_deserialization: typing_extensions.Literal[True],
{{/eq}}
{{/if}}
{{else}}
{{#if isOverload}}
{{#eq skipDeserialization "True"}}
skip_deserialization: typing_extensions.Literal[True],
{{/eq}}
{{/if}}
{{#with bodyParam}}
body: typing.Union[{{#each content}}{{#with this.schema}}{{baseName}}, {{> model_templates/schema_python_types }}{{/with}}{{/each}}schemas.Unset] = schemas.unset,
{{/with}}
{{/if}}
{{/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 "False"}}
skip_deserialization: typing_extensions.Literal[False] = ...,
{{/eq}}
{{#eq skipDeserialization "null"}}
skip_deserialization: bool = ...,
{{/eq}}
{{else}}
skip_deserialization: bool = False,
{{/if}}
{{#eq skipDeserialization "True"}}
) -> api_client.ApiResponseWithoutDeserialization: ...
{{/eq}}
{{#eq skipDeserialization "False"}}
) -> {{#if getAllResponsesAreErrors}}api_client.ApiResponseWithoutDeserialization: ...{{else}}typing.Union[
{{#each responses}}
{{#if isDefault}}
ApiResponseForDefault,
{{else}}
{{#if is2xx}}
ApiResponseFor{{code}},
{{/if}}
{{/if}}
{{/each}}
]: ...
{{/if}}
{{/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}}
):
{{/if}}
{{/eq}}