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