Skip to content
This repository was archived by the owner on Dec 25, 2024. It is now read-only.

Commit 7ebac48

Browse files
committed
Removes last result tpye hint in endpoint
1 parent 7675015 commit 7ebac48

File tree

114 files changed

+1990
-3675
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

114 files changed

+1990
-3675
lines changed

modules/openapi-json-schema-generator/src/main/resources/python/endpoint_args.handlebars

Lines changed: 21 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -45,41 +45,36 @@
4545
skip_deserialization: bool = False,
4646
{{/if}}
4747
{{#eq skipDeserialization "True"}}
48-
) -> api_client.ApiResponseWithoutDeserialization:
48+
) -> api_client.ApiResponseWithoutDeserialization: ...
4949
{{/eq}}
5050
{{#eq skipDeserialization "False"}}
51-
) -> typing.Union[{{#each responses}}{{#if isDefault}}ApiResponseForDefault,{{else}}{{#if is2xx}}ApiResponseFor{{code}},{{/if}}{{/if}}{{/each}}api_client.ApiResponse]:
52-
{{/eq}}
53-
{{#eq skipDeserialization "null"}}
54-
{{#if isOverload}}
5551
) -> typing.Union[
56-
{{#each responses}}
57-
{{#if isDefault}}
52+
{{#each responses}}
53+
{{#if isDefault}}
5854
ApiResponseForDefault,
59-
{{else}}
60-
{{#if is2xx}}
55+
{{else}}
56+
{{#if is2xx}}
6157
ApiResponseFor{{code}},
62-
{{/if}}
6358
{{/if}}
64-
{{/each}}
65-
api_client.ApiResponseWithoutDeserialization,
66-
]:
67-
{{else}}
59+
{{/if}}
60+
{{/each}}
61+
]: ...
62+
{{/eq}}
63+
{{#eq skipDeserialization "null"}}
64+
{{#if isOverload}}
6865
) -> typing.Union[
69-
{{#each responses}}
70-
{{#if isDefault}}
66+
{{#each responses}}
67+
{{#if isDefault}}
7168
ApiResponseForDefault,
72-
{{else}}
73-
{{#if is2xx}}
69+
{{else}}
70+
{{#if is2xx}}
7471
ApiResponseFor{{code}},
75-
{{/if}}
7672
{{/if}}
77-
{{/each}}
78-
api_client.ApiResponse,
73+
{{/if}}
74+
{{/each}}
7975
api_client.ApiResponseWithoutDeserialization,
80-
]:
76+
]: ...
77+
{{else}}
78+
):
8179
{{/if}}
82-
{{/eq}}
83-
{{#if isOverload}}
84-
...
85-
{{/if}}
80+
{{/eq}}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.9.9
1+
unset

samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch.py

Lines changed: 18 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,9 @@ def _call_123_test_special_tags_oapg(
7878
stream: bool = False,
7979
timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
8080
skip_deserialization: typing_extensions.Literal[False] = False,
81-
) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]:
82-
...
81+
) -> typing.Union[
82+
ApiResponseFor200,
83+
]: ...
8384

8485
@typing.overload
8586
def _call_123_test_special_tags_oapg(
@@ -90,8 +91,7 @@ def _call_123_test_special_tags_oapg(
9091
stream: bool = False,
9192
timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
9293
skip_deserialization: typing_extensions.Literal[True] = True,
93-
) -> api_client.ApiResponseWithoutDeserialization:
94-
...
94+
) -> api_client.ApiResponseWithoutDeserialization: ...
9595

9696
@typing.overload
9797
def _call_123_test_special_tags_oapg(
@@ -105,8 +105,7 @@ def _call_123_test_special_tags_oapg(
105105
) -> typing.Union[
106106
ApiResponseFor200,
107107
api_client.ApiResponseWithoutDeserialization,
108-
]:
109-
...
108+
]: ...
110109

111110
def _call_123_test_special_tags_oapg(
112111
self,
@@ -116,11 +115,7 @@ def _call_123_test_special_tags_oapg(
116115
stream: bool = False,
117116
timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
118117
skip_deserialization: bool = False,
119-
) -> typing.Union[
120-
ApiResponseFor200,
121-
api_client.ApiResponse,
122-
api_client.ApiResponseWithoutDeserialization,
123-
]:
118+
):
124119
"""
125120
To test special tags
126121
:param skip_deserialization: If true then api_response.response will be set but
@@ -183,8 +178,9 @@ def call_123_test_special_tags(
183178
stream: bool = False,
184179
timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
185180
skip_deserialization: typing_extensions.Literal[False] = False,
186-
) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]:
187-
...
181+
) -> typing.Union[
182+
ApiResponseFor200,
183+
]: ...
188184

189185
@typing.overload
190186
def call_123_test_special_tags(
@@ -195,8 +191,7 @@ def call_123_test_special_tags(
195191
stream: bool = False,
196192
timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
197193
skip_deserialization: typing_extensions.Literal[True] = True,
198-
) -> api_client.ApiResponseWithoutDeserialization:
199-
...
194+
) -> api_client.ApiResponseWithoutDeserialization: ...
200195

201196
@typing.overload
202197
def call_123_test_special_tags(
@@ -210,8 +205,7 @@ def call_123_test_special_tags(
210205
) -> typing.Union[
211206
ApiResponseFor200,
212207
api_client.ApiResponseWithoutDeserialization,
213-
]:
214-
...
208+
]: ...
215209

216210
def call_123_test_special_tags(
217211
self,
@@ -221,11 +215,7 @@ def call_123_test_special_tags(
221215
stream: bool = False,
222216
timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
223217
skip_deserialization: bool = False,
224-
) -> typing.Union[
225-
ApiResponseFor200,
226-
api_client.ApiResponse,
227-
api_client.ApiResponseWithoutDeserialization,
228-
]:
218+
):
229219
return self._call_123_test_special_tags_oapg(
230220
body=body,
231221
content_type=content_type,
@@ -248,8 +238,9 @@ def patch(
248238
stream: bool = False,
249239
timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
250240
skip_deserialization: typing_extensions.Literal[False] = False,
251-
) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]:
252-
...
241+
) -> typing.Union[
242+
ApiResponseFor200,
243+
]: ...
253244

254245
@typing.overload
255246
def patch(
@@ -260,8 +251,7 @@ def patch(
260251
stream: bool = False,
261252
timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
262253
skip_deserialization: typing_extensions.Literal[True] = True,
263-
) -> api_client.ApiResponseWithoutDeserialization:
264-
...
254+
) -> api_client.ApiResponseWithoutDeserialization: ...
265255

266256
@typing.overload
267257
def patch(
@@ -275,8 +265,7 @@ def patch(
275265
) -> typing.Union[
276266
ApiResponseFor200,
277267
api_client.ApiResponseWithoutDeserialization,
278-
]:
279-
...
268+
]: ...
280269

281270
def patch(
282271
self,
@@ -286,11 +275,7 @@ def patch(
286275
stream: bool = False,
287276
timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
288277
skip_deserialization: bool = False,
289-
) -> typing.Union[
290-
ApiResponseFor200,
291-
api_client.ApiResponse,
292-
api_client.ApiResponseWithoutDeserialization,
293-
]:
278+
):
294279
return self._call_123_test_special_tags_oapg(
295280
body=body,
296281
content_type=content_type,

samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch.pyi

Lines changed: 18 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,9 @@ class BaseApi(api_client.Api):
7373
stream: bool = False,
7474
timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
7575
skip_deserialization: typing_extensions.Literal[False] = False,
76-
) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]:
77-
...
76+
) -> typing.Union[
77+
ApiResponseFor200,
78+
]: ...
7879

7980
@typing.overload
8081
def _call_123_test_special_tags_oapg(
@@ -85,8 +86,7 @@ class BaseApi(api_client.Api):
8586
stream: bool = False,
8687
timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
8788
skip_deserialization: typing_extensions.Literal[True] = True,
88-
) -> api_client.ApiResponseWithoutDeserialization:
89-
...
89+
) -> api_client.ApiResponseWithoutDeserialization: ...
9090

9191
@typing.overload
9292
def _call_123_test_special_tags_oapg(
@@ -100,8 +100,7 @@ class BaseApi(api_client.Api):
100100
) -> typing.Union[
101101
ApiResponseFor200,
102102
api_client.ApiResponseWithoutDeserialization,
103-
]:
104-
...
103+
]: ...
105104

106105
def _call_123_test_special_tags_oapg(
107106
self,
@@ -111,11 +110,7 @@ class BaseApi(api_client.Api):
111110
stream: bool = False,
112111
timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
113112
skip_deserialization: bool = False,
114-
) -> typing.Union[
115-
ApiResponseFor200,
116-
api_client.ApiResponse,
117-
api_client.ApiResponseWithoutDeserialization,
118-
]:
113+
):
119114
"""
120115
To test special tags
121116
:param skip_deserialization: If true then api_response.response will be set but
@@ -178,8 +173,9 @@ class Call123TestSpecialTags(BaseApi):
178173
stream: bool = False,
179174
timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
180175
skip_deserialization: typing_extensions.Literal[False] = False,
181-
) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]:
182-
...
176+
) -> typing.Union[
177+
ApiResponseFor200,
178+
]: ...
183179

184180
@typing.overload
185181
def call_123_test_special_tags(
@@ -190,8 +186,7 @@ class Call123TestSpecialTags(BaseApi):
190186
stream: bool = False,
191187
timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
192188
skip_deserialization: typing_extensions.Literal[True] = True,
193-
) -> api_client.ApiResponseWithoutDeserialization:
194-
...
189+
) -> api_client.ApiResponseWithoutDeserialization: ...
195190

196191
@typing.overload
197192
def call_123_test_special_tags(
@@ -205,8 +200,7 @@ class Call123TestSpecialTags(BaseApi):
205200
) -> typing.Union[
206201
ApiResponseFor200,
207202
api_client.ApiResponseWithoutDeserialization,
208-
]:
209-
...
203+
]: ...
210204

211205
def call_123_test_special_tags(
212206
self,
@@ -216,11 +210,7 @@ class Call123TestSpecialTags(BaseApi):
216210
stream: bool = False,
217211
timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
218212
skip_deserialization: bool = False,
219-
) -> typing.Union[
220-
ApiResponseFor200,
221-
api_client.ApiResponse,
222-
api_client.ApiResponseWithoutDeserialization,
223-
]:
213+
):
224214
return self._call_123_test_special_tags_oapg(
225215
body=body,
226216
content_type=content_type,
@@ -243,8 +233,9 @@ class ApiForpatch(BaseApi):
243233
stream: bool = False,
244234
timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
245235
skip_deserialization: typing_extensions.Literal[False] = False,
246-
) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]:
247-
...
236+
) -> typing.Union[
237+
ApiResponseFor200,
238+
]: ...
248239

249240
@typing.overload
250241
def patch(
@@ -255,8 +246,7 @@ class ApiForpatch(BaseApi):
255246
stream: bool = False,
256247
timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
257248
skip_deserialization: typing_extensions.Literal[True] = True,
258-
) -> api_client.ApiResponseWithoutDeserialization:
259-
...
249+
) -> api_client.ApiResponseWithoutDeserialization: ...
260250

261251
@typing.overload
262252
def patch(
@@ -270,8 +260,7 @@ class ApiForpatch(BaseApi):
270260
) -> typing.Union[
271261
ApiResponseFor200,
272262
api_client.ApiResponseWithoutDeserialization,
273-
]:
274-
...
263+
]: ...
275264

276265
def patch(
277266
self,
@@ -281,11 +270,7 @@ class ApiForpatch(BaseApi):
281270
stream: bool = False,
282271
timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
283272
skip_deserialization: bool = False,
284-
) -> typing.Union[
285-
ApiResponseFor200,
286-
api_client.ApiResponse,
287-
api_client.ApiResponseWithoutDeserialization,
288-
]:
273+
):
289274
return self._call_123_test_special_tags_oapg(
290275
body=body,
291276
content_type=content_type,

0 commit comments

Comments
 (0)