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

Commit de44f74

Browse files
committed
Add fallback return type
1 parent f185503 commit de44f74

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

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

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
{{#if isOverload}}
55
body: typing.Union[{{#each content}}{{#with this.schema}}{{baseName}},{{> model_templates/schema_python_types }}{{/with}}{{/each}}{{#unless required}}schemas.Unset] = schemas.unset{{else}}]{{/unless}},
66
{{else}}
7-
body,
7+
body{{#unless required}} = schemas.unset{{/unless}},
88
{{/if}}
99
{{/with}}
1010
{{/if}}
@@ -52,17 +52,7 @@
5252
) -> api_client.ApiResponseWithoutDeserialization:
5353
{{/eq}}
5454
{{#eq skipDeserialization "False"}}
55-
) -> typing.Union[
56-
{{#each responses}}
57-
{{#if isDefault}}
58-
ApiResponseForDefault,
59-
{{else}}
60-
{{#if is2xx}}
61-
ApiResponseFor{{code}},
62-
{{/if}}
63-
{{/if}}
64-
{{/each}}
65-
]:
55+
) -> typing.Union[{{#each responses}}{{#if isDefault}}ApiResponseForDefault,{{else}}{{#if is2xx}}ApiResponseFor{{code}},{{/if}}{{/if}}{{/each}}api_client.ApiResponse,]:
6656
{{/eq}}
6757
{{#eq skipDeserialization "null"}}
6858
{{#if isOverload}}

0 commit comments

Comments
 (0)