-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathendpoint_args.handlebars
More file actions
77 lines (77 loc) · 2.51 KB
/
endpoint_args.handlebars
File metadata and controls
77 lines (77 loc) · 2.51 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
self,
{{#if bodyParam}}
{{#with bodyParam}}
{{#if isOverload}}
body: typing.Union[{{#each content}}{{#with this.schema}}{{baseName}},{{> model_templates/schema_python_types }}{{/with}}{{/each}}{{#unless required}}schemas.Unset] = schemas.unset{{else}}]{{/unless}},
{{else}}
body{{#unless required}} = schemas.unset{{/unless}},
{{/if}}
{{/with}}
{{/if}}
{{#if queryParams}}
query_params{{#if isOverload}}: RequestQueryParams{{/if}} = frozendict.frozendict(),
{{/if}}
{{#if headerParams}}
header_params{{#if isOverload}}: RequestHeaderParams{{/if}} = frozendict.frozendict(),
{{/if}}
{{#if pathParams}}
path_params{{#if isOverload}}: RequestPathParams{{/if}} = frozendict.frozendict(),
{{/if}}
{{#if cookieParams}}
cookie_params{{#if isOverload}}: RequestCookieParams{{/if}} = frozendict.frozendict(),
{{/if}}
{{#with bodyParam}}
{{#each content}}
{{#if @first}}
content_type{{#if isOverload}}: str{{/if}} = '{{{@key}}}',
{{/if}}
{{/each}}
{{/with}}
{{#if produces}}
accept_content_types{{#if isOverload}}: typing.Tuple[str]{{/if}} = _all_accept_content_types,
{{/if}}
{{#if servers}}
host_index{{#if isOverload}}: typing.Optional[int]{{/if}} = None,
{{/if}}
stream{{#if isOverload}}: bool{{/if}} = False,
timeout{{#if isOverload}}: typing.Optional[typing.Union[int, typing.Tuple]]{{/if}} = 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 = 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}}
):
{{/if}}
{{/eq}}
{{#if isOverload}}
...
{{/if}}